Signed-off-by: Eric Pouech eric.pouech@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__);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/codepage.c | 187 ++++++++++++++++++++-------------------- 1 file changed, 94 insertions(+), 93 deletions(-)
diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c index 42e49888e05..e8fc2a0891d 100644 --- a/dlls/kernel32/tests/codepage.c +++ b/dlls/kernel32/tests/codepage.c @@ -18,6 +18,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdarg.h> #include <stdio.h> @@ -40,7 +41,7 @@ static void test_destination_buffer(void)
SetLastError(0xdeadbeef); needed = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, NULL, 0, NULL, NULL); - ok( (needed > 0), "returned %d with %u (expected '> 0')\n", + ok( (needed > 0), "returned %d with %lu (expected '> 0')\n", needed, GetLastError());
maxsize = needed*2; @@ -52,14 +53,14 @@ static void test_destination_buffer(void) buffer[maxsize] = '\0'; SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, needed+1, NULL, NULL); - ok( (len > 0), "returned %d with %u and '%s' (expected '> 0')\n", + ok( (len > 0), "returned %d with %lu and '%s' (expected '> 0')\n", len, GetLastError(), buffer);
memset(buffer, 'x', maxsize); buffer[maxsize] = '\0'; SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, needed, NULL, NULL); - ok( (len > 0), "returned %d with %u and '%s' (expected '> 0')\n", + ok( (len > 0), "returned %d with %lu and '%s' (expected '> 0')\n", len, GetLastError(), buffer);
memset(buffer, 'x', maxsize); @@ -67,7 +68,7 @@ static void test_destination_buffer(void) SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, needed-1, NULL, NULL); ok( !len && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "returned %d with %u and '%s' (expected '0' with " + "returned %d with %lu and '%s' (expected '0' with " "ERROR_INSUFFICIENT_BUFFER)\n", len, GetLastError(), buffer);
memset(buffer, 'x', maxsize); @@ -75,18 +76,18 @@ static void test_destination_buffer(void) SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, 1, NULL, NULL); ok( !len && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "returned %d with %u and '%s' (expected '0' with " + "returned %d with %lu and '%s' (expected '0' with " "ERROR_INSUFFICIENT_BUFFER)\n", len, GetLastError(), buffer);
SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, 0, NULL, NULL); - ok( (len > 0), "returned %d with %u (expected '> 0')\n", + ok( (len > 0), "returned %d with %lu (expected '> 0')\n", len, GetLastError());
SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, NULL, needed, NULL, NULL); ok( !len && (GetLastError() == ERROR_INVALID_PARAMETER), - "returned %d with %u (expected '0' with " + "returned %d with %lu (expected '0' with " "ERROR_INVALID_PARAMETER)\n", len, GetLastError());
HeapFree(GetProcessHeap(), 0, buffer); @@ -102,14 +103,14 @@ static void test_null_source(void) len = WideCharToMultiByte(CP_ACP, 0, NULL, 0, NULL, 0, NULL, NULL); GLE = GetLastError(); ok(!len && GLE == ERROR_INVALID_PARAMETER, - "WideCharToMultiByte returned %d with GLE=%u (expected 0 with ERROR_INVALID_PARAMETER)\n", + "WideCharToMultiByte returned %d with GLE=%lu (expected 0 with ERROR_INVALID_PARAMETER)\n", len, GLE);
SetLastError(0); len = WideCharToMultiByte(CP_ACP, 0, NULL, -1, NULL, 0, NULL, NULL); GLE = GetLastError(); ok(!len && GLE == ERROR_INVALID_PARAMETER, - "WideCharToMultiByte returned %d with GLE=%u (expected 0 with ERROR_INVALID_PARAMETER)\n", + "WideCharToMultiByte returned %d with GLE=%lu (expected 0 with ERROR_INVALID_PARAMETER)\n", len, GLE); }
@@ -124,7 +125,7 @@ static void test_negative_source_length(void) memset(buf,'x',sizeof(buf)); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -2002, buf, 10, NULL, NULL); ok(len == 7 && GetLastError() == 0xdeadbeef, - "WideCharToMultiByte(-2002): len=%d error=%u\n", len, GetLastError()); + "WideCharToMultiByte(-2002): len=%d error=%lu\n", len, GetLastError()); ok(!lstrcmpA(buf, "foobar"), "WideCharToMultiByte(-2002): expected "foobar" got "%s"\n", buf);
@@ -132,13 +133,13 @@ static void test_negative_source_length(void) memset(bufW,'x',sizeof(bufW)); len = MultiByteToWideChar(CP_ACP, 0, "foobar", -2002, bufW, 10); ok(len == 7 && !lstrcmpW(bufW, foobarW) && GetLastError() == 0xdeadbeef, - "MultiByteToWideChar(-2002): len=%d error=%u\n", len, GetLastError()); + "MultiByteToWideChar(-2002): len=%d error=%lu\n", len, GetLastError());
SetLastError(0xdeadbeef); memset(bufW, 'x', sizeof(bufW)); len = MultiByteToWideChar(CP_ACP, 0, "foobar", -1, bufW, 6); ok(len == 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "MultiByteToWideChar(-1): len=%d error=%u\n", len, GetLastError()); + "MultiByteToWideChar(-1): len=%d error=%lu\n", len, GetLastError()); }
#define LONGBUFLEN 100000 @@ -156,33 +157,33 @@ static void test_negative_dest_length(void) memset(bufA,'x',sizeof(bufA)); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, bufA, -1, NULL, NULL); ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, - "WideCharToMultiByte(destlen -1): len=%d error=%x\n", len, GetLastError()); + "WideCharToMultiByte(destlen -1): len=%d error=%lx\n", len, GetLastError());
SetLastError( 0xdeadbeef ); memset(bufW,'x',sizeof(bufW)); len = MultiByteToWideChar(CP_ACP, 0, foobarA, -1, bufW, -1); ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, - "MultiByteToWideChar(destlen -1): len=%d error=%x\n", len, GetLastError()); + "MultiByteToWideChar(destlen -1): len=%d error=%lx\n", len, GetLastError());
/* Test return on -1000 dest length */ SetLastError( 0xdeadbeef ); memset(bufA,'x',sizeof(bufA)); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, bufA, -1000, NULL, NULL); ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, - "WideCharToMultiByte(destlen -1000): len=%d error=%x\n", len, GetLastError()); + "WideCharToMultiByte(destlen -1000): len=%d error=%lx\n", len, GetLastError());
SetLastError( 0xdeadbeef ); memset(bufW,'x',sizeof(bufW)); len = MultiByteToWideChar(CP_ACP, 0, foobarA, -1000, bufW, -1); ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, - "MultiByteToWideChar(destlen -1000): len=%d error=%x\n", len, GetLastError()); + "MultiByteToWideChar(destlen -1000): len=%d error=%lx\n", len, GetLastError());
/* Test return on INT_MAX dest length */ SetLastError( 0xdeadbeef ); memset(bufA,'x',sizeof(bufA)); len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, bufA, INT_MAX, NULL, NULL); ok(len == 7 && !lstrcmpA(bufA, "foobar") && GetLastError() == 0xdeadbeef, - "WideCharToMultiByte(destlen INT_MAX): len=%d error=%x\n", len, GetLastError()); + "WideCharToMultiByte(destlen INT_MAX): len=%d error=%lx\n", len, GetLastError());
/* Test return on INT_MAX dest length and very long input */ SetLastError( 0xdeadbeef ); @@ -196,7 +197,7 @@ static void test_negative_dest_length(void) len = WideCharToMultiByte(CP_ACP, 0, originalW, -1, bufA, INT_MAX, NULL, NULL); theError = GetLastError(); ok(len == LONGBUFLEN && !lstrcmpA(bufA, originalA) && theError == 0xdeadbeef, - "WideCharToMultiByte(srclen %d, destlen INT_MAX): len %d error=%x\n", LONGBUFLEN, len, theError); + "WideCharToMultiByte(srclen %d, destlen INT_MAX): len %d error=%lx\n", LONGBUFLEN, len, theError);
}
@@ -212,87 +213,87 @@ static void test_other_invalid_parameters(void) /* Unrecognized flag => ERROR_INVALID_FLAGS */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0x100, w_string, -1, c_string, c_string_len, NULL, NULL); - ok(len == 0 && GetLastError() == ERROR_INVALID_FLAGS, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_FLAGS, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0x800, w_string, -1, c_string, c_string_len, NULL, NULL); - ok(len == 0 && GetLastError() == ERROR_INVALID_FLAGS, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_FLAGS, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = MultiByteToWideChar(CP_ACP, 0x10, c_string, -1, w_string, w_string_len); - ok(len == 0 && GetLastError() == ERROR_INVALID_FLAGS, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_FLAGS, "len=%d error=%lx\n", len, GetLastError());
/* Unrecognized flag and invalid codepage => ERROR_INVALID_PARAMETER */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(0xdeadbeef, 0x100, w_string, w_string_len, c_string, c_string_len, NULL, NULL); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = MultiByteToWideChar(0xdeadbeef, 0x10, c_string, c_string_len, w_string, w_string_len); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
/* Unrecognized flag and src is NULL => ERROR_INVALID_PARAMETER */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0x100, NULL, -1, c_string, c_string_len, NULL, NULL); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = MultiByteToWideChar(CP_ACP, 0x10, NULL, -1, w_string, w_string_len); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
/* srclen=0 => ERROR_INVALID_PARAMETER */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0, w_string, 0, c_string, c_string_len, NULL, NULL); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = MultiByteToWideChar(CP_ACP, 0, c_string, 0, w_string, w_string_len); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
/* dst=NULL but dstlen not 0 => ERROR_INVALID_PARAMETER */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_ACP, 0, w_string, w_string_len, NULL, c_string_len, NULL, NULL); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = MultiByteToWideChar(CP_ACP, 0, c_string, c_string_len, NULL, w_string_len); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
/* CP_UTF7, CP_UTF8, or CP_SYMBOL and defchar not NULL => ERROR_INVALID_PARAMETER */ /* CP_SYMBOL's behavior here is undocumented */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_UTF7, 0, w_string, w_string_len, c_string, c_string_len, c_string, NULL); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_UTF8, 0, w_string, w_string_len, c_string, c_string_len, c_string, NULL); ok((len == 0 && GetLastError() == ERROR_INVALID_PARAMETER) - || broken(len == 12) /* Win10 1709+ */, "len=%d error=%x\n", len, GetLastError()); + || broken(len == 12) /* Win10 1709+ */, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_SYMBOL, 0, w_string, w_string_len, c_string, c_string_len, c_string, NULL); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
/* CP_UTF7, CP_UTF8, or CP_SYMBOL and used not NULL => ERROR_INVALID_PARAMETER */ /* CP_SYMBOL's behavior here is undocumented */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_UTF7, 0, w_string, w_string_len, c_string, c_string_len, NULL, &used); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_UTF8, 0, w_string, w_string_len, c_string, c_string_len, NULL, &used); ok((len == 0 && GetLastError() == ERROR_INVALID_PARAMETER) - || broken(len == 12) /* Win10 1709+ */, "len=%d error=%x\n", len, GetLastError()); + || broken(len == 12) /* Win10 1709+ */, "len=%d error=%lx\n", len, GetLastError());
SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_SYMBOL, 0, w_string, w_string_len, c_string, c_string_len, NULL, &used); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
/* CP_UTF7, flags not 0 and used not NULL => ERROR_INVALID_PARAMETER */ @@ -301,14 +302,14 @@ static void test_other_invalid_parameters(void) instead except on Windows NT4 */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_UTF7, 1, w_string, w_string_len, c_string, c_string_len, NULL, &used); - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%lx\n", len, GetLastError());
/* CP_UTF8, unrecognized flag and used not NULL => ERROR_INVALID_PARAMETER */ SetLastError(0xdeadbeef); len = WideCharToMultiByte(CP_UTF8, 0x100, w_string, w_string_len, c_string, c_string_len, NULL, &used); ok(len == 0, "wrong ret %d\n", len); ok(GetLastError() == ERROR_INVALID_PARAMETER - || GetLastError() == ERROR_INVALID_FLAGS /* Win10 1709+ */, "wrong error %u\n", GetLastError()); + || GetLastError() == ERROR_INVALID_FLAGS /* Win10 1709+ */, "wrong error %lu\n", GetLastError()); }
static void test_overlapped_buffers(void) @@ -326,14 +327,14 @@ static void test_overlapped_buffers(void) ret = WideCharToMultiByte(CP_ACP, 0, (WCHAR *)(buf + 1), -1, buf, sizeof(buf), NULL, NULL); ok(ret == sizeof(strA), "unexpected ret %d\n", ret); ok(!memcmp(buf, strA, sizeof(strA)), "conversion failed: %s\n", buf); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
SetLastError(0xdeadbeef); memcpy(buf + overlap_limit, strA, sizeof(strA)); ret = MultiByteToWideChar(CP_ACP, 0, buf + overlap_limit, -1, (WCHAR *)buf, sizeof(buf) / sizeof(WCHAR)); ok(ret == ARRAY_SIZE(strW), "unexpected ret %d\n", ret); ok(!memcmp(buf, strW, sizeof(strW)), "conversion failed: %s\n", wine_dbgstr_wn((WCHAR *)buf, ARRAY_SIZE(strW))); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError()); }
static void test_string_conversion(LPBOOL bUsedDefaultChar) @@ -353,14 +354,14 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ok(ret == 1, "ret is %d\n", ret); ok(mbc == '\xe4', "mbc is %d\n", mbc); if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = WideCharToMultiByte(1252, 0, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); ok(ret == 1, "ret is %d\n", ret); ok(mbc == 63, "mbc is %d\n", mbc); if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
if (IsValidCodePage(1251)) { @@ -371,14 +372,14 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); ok(GetLastError() == 0xdeadbeef || broken(GetLastError() == 0), /* win95 */ - "GetLastError() is %u\n", GetLastError()); + "GetLastError() is %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = WideCharToMultiByte(1251, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); ok(ret == 1, "ret is %d\n", ret); ok(mbc == 97, "mbc is %d\n", mbc); if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError()); } else skip("Codepage 1251 not available\n"); @@ -389,14 +390,14 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ok(ret == 0, "ret is %d\n", ret); ok(mbc == 84, "mbc is %d\n", mbc); if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = WideCharToMultiByte(1252, 0, wcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); ok(ret == 5, "ret is %d\n", ret); ok(!strcmp(mbs, "Th?i"), "mbs is %s\n", mbs); if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError()); mbs[0] = 0;
/* WideCharToMultiByte mustn't add any null character automatically. @@ -406,7 +407,7 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ok(ret == 3, "ret is %d\n", ret); ok(!strcmp(mbs, "Th?i"), "mbs is %s\n", mbs); if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError()); ZeroMemory(mbs, 5);
/* Now this shouldn't be the case like above as we zeroed the complete string buffer. */ @@ -415,7 +416,7 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ok(ret == 3, "ret is %d\n", ret); ok(!strcmp(mbs, "Th?"), "mbs is %s\n", mbs); if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
/* Double-byte tests */ ret = WideCharToMultiByte(1252, 0, dbwcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); @@ -433,13 +434,13 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ret = WideCharToMultiByte(1252, 0, &wc2, 1, NULL, 0, NULL, bUsedDefaultChar); ok(ret == 1, "ret is %d\n", ret); if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = WideCharToMultiByte(1252, 0, wcs, -1, NULL, 0, NULL, bUsedDefaultChar); ok(ret == 5, "ret is %d\n", ret); if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
if (!IsValidCodePage(950)) { @@ -453,13 +454,13 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ok(ret == 5, "ret is %d\n", ret); ok(!strcmp(mbs, "\xb5H\xa9\xd2"), "mbs is %s\n", mbs); if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = WideCharToMultiByte(950, 0, dbwcs, 1, &mbc, 1, NULL, bUsedDefaultChar); ok(ret == 0, "ret is %d\n", ret); if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %lu\n", GetLastError()); ZeroMemory(mbs, 5);
SetLastError(0xdeadbeef); @@ -467,20 +468,20 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ok(ret == 2, "ret is %d\n", ret); ok(!strcmp(mbs, "\xb5H"), "mbs is %s\n", mbs); if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
/* Length-only tests */ SetLastError(0xdeadbeef); ret = WideCharToMultiByte(950, 0, dbwcs, 1, NULL, 0, NULL, bUsedDefaultChar); ok(ret == 2, "ret is %d\n", ret); if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = WideCharToMultiByte(950, 0, dbwcs, -1, NULL, 0, NULL, bUsedDefaultChar); ok(ret == 5, "ret is %d\n", ret); if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError() is %lu\n", GetLastError()); }
static void test_utf7_encoding(void) @@ -709,7 +710,7 @@ static void test_utf7_encoding(void) if (!tests[i].len) { ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "tests[%i]: expected error=0x%x, got error=0x%x\n", + "tests[%i]: expected error=0x%x, got error=0x%lx\n", i, ERROR_INSUFFICIENT_BUFFER, GetLastError()); } ok(len == tests[i].len, "tests[%i]: expected len=%i, got len=%i\n", i, tests[i].len, len); @@ -983,7 +984,7 @@ static void test_utf7_decoding(void) if (!tests[i].len && tests[i].chars_written) { ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "tests[%i]: expected error=0x%x, got error=0x%x\n", + "tests[%i]: expected error=0x%x, got error=0x%lx\n", i, ERROR_INSUFFICIENT_BUFFER, GetLastError()); } ok(len == tests[i].len, "tests[%i]: expected len=%i, got len=%i\n", i, tests[i].len, len); @@ -1034,11 +1035,11 @@ static void test_undefined_byte_char(void) testset[i].str, -1, NULL, 0); err = GetLastError(); if (testset[i].is_error) { - ok(err == ERROR_NO_UNICODE_TRANSLATION, "Test %u: err is %u\n", i, err); + ok(err == ERROR_NO_UNICODE_TRANSLATION, "Test %u: err is %lu\n", i, err); ok(ret == 0, "Test %u: ret is %d\n", i, ret); } else { - ok(err == 0xdeadbeef, "Test %u: err is %u\n", i, err); + ok(err == 0xdeadbeef, "Test %u: err is %lu\n", i, err); ok(ret == 2, "Test %u: ret is %d\n", i, ret); }
@@ -1046,7 +1047,7 @@ static void test_undefined_byte_char(void) ret = MultiByteToWideChar(testset[i].codepage, 0, testset[i].str, -1, NULL, 0); err = GetLastError(); - ok(err == 0xdeadbeef, "Test %u: err is %u\n", i, err); + ok(err == 0xdeadbeef, "Test %u: err is %lu\n", i, err); ok(ret == 2, "Test %u: ret is %d\n", i, ret); } } @@ -1129,42 +1130,42 @@ static void test_threadcp(void)
cp = 0xdeadbeef; GetLocaleInfoA(lcids[i].lcid, LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER, (LPSTR)&cp, sizeof(cp)); - ok(cp == lcids[i].threadcp, "wrong codepage %u for lcid %04x, should be %u\n", cp, lcids[i].lcid, lcids[i].threadcp); + ok(cp == lcids[i].threadcp, "wrong codepage %u for lcid %04lx, should be %u\n", cp, lcids[i].lcid, lcids[i].threadcp);
/* GetCPInfoEx/GetCPInfo - CP_ACP */ SetLastError(0xdeadbeef); memset(&cpi, 0, sizeof(cpi)); ret = GetCPInfoExA(CP_ACP, 0, &cpi); - ok(ret, "GetCPInfoExA failed for lcid %04x, error %d\n", lcids[i].lcid, GetLastError()); - ok(cpi.CodePage == acp, "wrong codepage %u for lcid %04x, should be %u\n", cpi.CodePage, lcids[i].lcid, acp); + ok(ret, "GetCPInfoExA failed for lcid %04lx, error %ld\n", lcids[i].lcid, GetLastError()); + ok(cpi.CodePage == acp, "wrong codepage %u for lcid %04lx, should be %u\n", cpi.CodePage, lcids[i].lcid, acp);
/* WideCharToMultiByte - CP_ACP */ num = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, NULL, 0, NULL, NULL); - ok(num == 7, "ret is %d (%04x)\n", num, lcids[i].lcid); + ok(num == 7, "ret is %d (%04lx)\n", num, lcids[i].lcid);
/* MultiByteToWideChar - CP_ACP */ num = MultiByteToWideChar(CP_ACP, 0, "foobar", -1, NULL, 0); - ok(num == 7, "ret is %d (%04x)\n", num, lcids[i].lcid); + ok(num == 7, "ret is %d (%04lx)\n", num, lcids[i].lcid);
/* GetCPInfoEx/GetCPInfo - CP_THREAD_ACP */ SetLastError(0xdeadbeef); memset(&cpi, 0, sizeof(cpi)); ret = GetCPInfoExA(CP_THREAD_ACP, 0, &cpi); - ok(ret, "GetCPInfoExA failed for lcid %04x, error %d\n", lcids[i].lcid, GetLastError()); + ok(ret, "GetCPInfoExA failed for lcid %04lx, error %ld\n", lcids[i].lcid, GetLastError()); if (lcids[i].threadcp) - ok(cpi.CodePage == lcids[i].threadcp, "wrong codepage %u for lcid %04x, should be %u\n", + ok(cpi.CodePage == lcids[i].threadcp, "wrong codepage %u for lcid %04lx, should be %u\n", cpi.CodePage, lcids[i].lcid, lcids[i].threadcp); else ok(cpi.CodePage == acp || cpi.CodePage == CP_UTF8 /* Win10 1809+ */, - "wrong codepage %u for lcid %04x, should be %u\n", cpi.CodePage, lcids[i].lcid, acp); + "wrong codepage %u for lcid %04lx, should be %u\n", cpi.CodePage, lcids[i].lcid, acp);
/* WideCharToMultiByte - CP_THREAD_ACP */ num = WideCharToMultiByte(CP_THREAD_ACP, 0, foobarW, -1, NULL, 0, NULL, NULL); - ok(num == 7, "ret is %d (%04x)\n", num, lcids[i].lcid); + ok(num == 7, "ret is %d (%04lx)\n", num, lcids[i].lcid);
/* MultiByteToWideChar - CP_THREAD_ACP */ num = MultiByteToWideChar(CP_THREAD_ACP, 0, "foobar", -1, NULL, 0); - ok(num == 7, "ret is %d (%04x)\n", num, lcids[i].lcid); + ok(num == 7, "ret is %d (%04lx)\n", num, lcids[i].lcid); }
/* IsDBCSLeadByteEx - locales without codepage */ @@ -1176,7 +1177,7 @@ static void test_threadcp(void) islead_default = IsDBCSLeadByteEx(cpi.CodePage, isleads_nocp[i].testchar); islead = IsDBCSLeadByteEx(CP_THREAD_ACP, isleads_nocp[i].testchar);
- ok(islead == islead_default, "wrong islead %i for test char %x in lcid %04x. should be %i\n", + ok(islead == islead_default, "wrong islead %i for test char %x in lcid %04lx. should be %i\n", islead, isleads_nocp[i].testchar, isleads_nocp[i].lcid, islead_default); }
@@ -1186,7 +1187,7 @@ static void test_threadcp(void) SetThreadLocale(isleads[i].lcid);
islead = IsDBCSLeadByteEx(CP_THREAD_ACP, isleads[i].testchar); - ok(islead == isleads[i].islead, "wrong islead %i for test char %x in lcid %04x. should be %i\n", + ok(islead == isleads[i].islead, "wrong islead %i for test char %x in lcid %04lx. should be %i\n", islead, isleads[i].testchar, isleads[i].lcid, isleads[i].islead); }
@@ -1218,10 +1219,10 @@ static void test_dbcs_to_widechar(void) count = MultiByteToWideChar(936, flags[i], (char*)&buf[0], 2, NULL, 0); count2 = MultiByteToWideChar(936, flags[i], (char*)&buf[0], 2, wbuf, count);
- ok(count == 1, "%04x: returned %d (expected 1)\n", flags[i], count); - ok(count2 == 1, "%04x: returned %d (expected 1)\n", flags[i], count2); - ok(wbuf[0] == 0x770b, "%04x: returned %04x (expected 770b)\n", flags[i], wbuf[0]); - ok(wbuf[1] == 0xffff, "%04x: returned %04x (expected ffff)\n", flags[i], wbuf[1]); + ok(count == 1, "%04lx: returned %d (expected 1)\n", flags[i], count); + ok(count2 == 1, "%04lx: returned %d (expected 1)\n", flags[i], count2); + ok(wbuf[0] == 0x770b, "%04lx: returned %04x (expected 770b)\n", flags[i], wbuf[0]); + ok(wbuf[1] == 0xffff, "%04lx: returned %04x (expected ffff)\n", flags[i], wbuf[1]); }
for (i = 0; i < ARRAY_SIZE(flags); ++i) @@ -1233,19 +1234,19 @@ static void test_dbcs_to_widechar(void)
if (flags[i] & MB_ERR_INVALID_CHARS) { - ok(count == 0, "%04x: returned %d (expected 0)\n", flags[i], count); - ok(count2 == 0, "%04x: returned %d (expected 0)\n", flags[i], count2); - ok(GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%04x: returned %d (expected %d)\n", + ok(count == 0, "%04lx: returned %d (expected 0)\n", flags[i], count); + ok(count2 == 0, "%04lx: returned %d (expected 0)\n", flags[i], count2); + ok(GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%04lx: returned %ld (expected %d)\n", flags[i], GetLastError(), ERROR_NO_UNICODE_TRANSLATION); } else { - ok(count == 2, "%04x: returned %d (expected 2)\n", flags[i], count); - ok(count2 == 2, "%04x: returned %d (expected 2)\n", flags[i], count2); - ok(wbuf[0] == 0x770b, "%04x: returned %04x (expected 770b)\n", flags[i], wbuf[0]); + ok(count == 2, "%04lx: returned %d (expected 2)\n", flags[i], count); + ok(count2 == 2, "%04lx: returned %d (expected 2)\n", flags[i], count2); + ok(wbuf[0] == 0x770b, "%04lx: returned %04x (expected 770b)\n", flags[i], wbuf[0]); ok(wbuf[1] == 0x003f || broken(wbuf[1] == 0), /*windows xp*/ - "%04x: wrong wide char: %04x\n", flags[i], wbuf[1]); - ok(wbuf[2] == 0xffff, "%04x: returned %04x (expected ffff)\n", flags[i], wbuf[2]); + "%04lx: wrong wide char: %04x\n", flags[i], wbuf[1]); + ok(wbuf[2] == 0xffff, "%04lx: returned %04x (expected ffff)\n", flags[i], wbuf[2]); } }
@@ -1256,12 +1257,12 @@ static void test_dbcs_to_widechar(void) count = MultiByteToWideChar(936, flags[i], (char*)&buf[0], 4, NULL, 0); SetLastError( 0xdeadbeef ); count2 = MultiByteToWideChar(936, flags[i], (char*)&buf[0], 4, wbuf, count); - ok(count == count2, "%04x: returned %d (expected %d)\n", flags[i], count2, count); + ok(count == count2, "%04lx: returned %d (expected %d)\n", flags[i], count2, count);
if (flags[i] & MB_ERR_INVALID_CHARS) { - ok(count == 0, "%04x: returned %d (expected 0)\n", flags[i], count); - ok(GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%04x: returned %d (expected %d)\n", + ok(count == 0, "%04lx: returned %d (expected 0)\n", flags[i], count); + ok(GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%04lx: returned %ld (expected %d)\n", flags[i], GetLastError(), ERROR_NO_UNICODE_TRANSLATION); } else @@ -1269,10 +1270,10 @@ static void test_dbcs_to_widechar(void) WCHAR wbuf_ok[] = { 0x770b, 0x003f, '\0', 0xffff }; WCHAR wbuf_broken[] = { 0x770b, '\0', 0xffff, 0xffff }; ok(count == 3 || broken(count == 2 /*windows xp*/), - "%04x: returned %d (expected 3)\n", flags[i], count); + "%04lx: returned %d (expected 3)\n", flags[i], count); ok(!memcmp(wbuf, wbuf_ok, sizeof(wbuf_ok)) || broken(!memcmp(wbuf, wbuf_broken, sizeof(wbuf_broken))), - "%04x: returned %04x %04x %04x %04x (expected %04x %04x %04x %04x)\n", + "%04lx: returned %04x %04x %04x %04x (expected %04x %04x %04x %04x)\n", flags[i], wbuf[0], wbuf[1], wbuf[2], wbuf[3], wbuf_ok[0], wbuf_ok[1], wbuf_ok[2], wbuf_ok[3]); } @@ -1285,12 +1286,12 @@ static void test_dbcs_to_widechar(void) count = MultiByteToWideChar(936, flags[i], (char*)&buf[0], 5, NULL, 0); SetLastError( 0xdeadbeef ); count2 = MultiByteToWideChar(936, flags[i], (char*)&buf[0], 5, wbuf, count); - ok(count == count2, "%04x: returned %d (expected %d)\n", flags[i], count2, count); + ok(count == count2, "%04lx: returned %d (expected %d)\n", flags[i], count2, count);
if (flags[i] & MB_ERR_INVALID_CHARS) { - ok(count == 0, "%04x: returned %d (expected 0)\n", flags[i], count); - ok(GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%04x: returned %d (expected %d)\n", + ok(count == 0, "%04lx: returned %d (expected 0)\n", flags[i], count); + ok(GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%04lx: returned %ld (expected %d)\n", flags[i], GetLastError(), ERROR_NO_UNICODE_TRANSLATION); } else @@ -1298,10 +1299,10 @@ static void test_dbcs_to_widechar(void) WCHAR wbuf_ok[] = { 0x770b, 0x003f, '\0', 'x', 0xffff }; WCHAR wbuf_broken[] = { 0x770b, '\0', 'x', 0xffff, 0xffff }; ok(count == 4 || broken(count == 3), - "%04x: returned %d (expected 4)\n", flags[i], count); + "%04lx: returned %d (expected 4)\n", flags[i], count); ok(!memcmp(wbuf, wbuf_ok, sizeof(wbuf_ok)) || broken(!memcmp(wbuf, wbuf_broken, sizeof(wbuf_broken))), - "%04x: returned %04x %04x %04x %04x %04x (expected %04x %04x %04x %04x %04x)\n", + "%04lx: returned %04x %04x %04x %04x %04x (expected %04x %04x %04x %04x %04x)\n", flags[i], wbuf[0], wbuf[1], wbuf[2], wbuf[3], wbuf[4], wbuf_ok[0], wbuf_ok[1], wbuf_ok[2], wbuf_ok[3], wbuf_ok[4]); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/comm.c | 353 ++++++++++++++++++++++---------------------- 1 file changed, 177 insertions(+), 176 deletions(-)
diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c index f82e5e60677..30ca0e23644 100644 --- a/dlls/kernel32/tests/comm.c +++ b/dlls/kernel32/tests/comm.c @@ -17,6 +17,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdio.h>
@@ -450,7 +451,7 @@ static void check_result(const char *function, const TEST *ptest, int initial_va DWORD LastError = GetLastError(); DWORD CorrectError = (ptest->result ? 0xdeadbeef : ERROR_INVALID_PARAMETER);
- ok(LastError == CorrectError, "%s("%s"), 0x%02x: GetLastError() returned %d, should be %d\n", function, ptest->string, initial_value, LastError, CorrectError); + ok(LastError == CorrectError, "%s("%s"), 0x%02x: GetLastError() returned %ld, should be %ld\n", function, ptest->string, initial_value, LastError, CorrectError); ok(result == ptest->result, "%s("%s"), 0x%02x: return value should be %s\n", function, ptest->string, initial_value, ptest->result ? "TRUE" : "FALSE"); }
@@ -461,7 +462,7 @@ static void check_dcb(const char *function, const TEST *ptest, int initial_value { /* DCBlength is a special case since Win 9x sets it but NT does not. We will accept either as correct. */ - check_dcb_member2(DCBlength, (DWORD)sizeof(DCB), "%u"); + check_dcb_member2(DCBlength, (DWORD)sizeof(DCB), "%lu");
/* For old style control strings Win 9x does not set the next five members, NT does. */ if(ptest->old_style && ptest->result) @@ -505,7 +506,7 @@ static void check_dcb(const char *function, const TEST *ptest, int initial_value }
/* Check the result of the DCB members. */ - check_dcb_member(BaudRate, "%u"); + check_dcb_member(BaudRate, "%lu"); check_dcb_member(fBinary, "%u"); check_dcb_member(fParity, "%u"); check_dcb_member(fTXContinueOnXoff, "%u"); @@ -527,7 +528,7 @@ static void check_dcb(const char *function, const TEST *ptest, int initial_value check_dcb_member(wReserved1, "%u"); }
-#define check_timeouts_member(a) ok(ptimeouts1->a == ptimeouts2->a, "%s("%s"), 0x%02x: "#a" is %u, should be %u\n", function, ptest->string, initial_value, ptimeouts1->a, ptimeouts2->a); +#define check_timeouts_member(a) ok(ptimeouts1->a == ptimeouts2->a, "%s("%s"), 0x%02x: "#a" is %lu, should be %lu\n", function, ptest->string, initial_value, ptimeouts1->a, ptimeouts2->a);
static void check_timeouts(const char *function, const TEST *ptest, int initial_value, const COMMTIMEOUTS *ptimeouts1, const COMMTIMEOUTS *ptimeouts2) { @@ -723,10 +724,10 @@ static HANDLE test_OpenComm(BOOL doOverlap) return INVALID_HANDLE_VALUE; }
- ok(ret, "Unexpected error %u on open\n", GetLastError()); - ok(comstat.cbInQue == 0, "Unexpected %d chars in InQueue\n",comstat.cbInQue); - ok(comstat.cbOutQue == 0, "Still pending %d characters in OutQueue\n", comstat.cbOutQue); - ok(errors == 0, "Unexpected errors 0x%08x\n", errors); + ok(ret, "Unexpected error %lu on open\n", GetLastError()); + ok(comstat.cbInQue == 0, "Unexpected %ld chars in InQueue\n",comstat.cbInQue); + ok(comstat.cbOutQue == 0, "Still pending %ld characters in OutQueue\n", comstat.cbOutQue); + ok(errors == 0, "Unexpected errors 0x%08lx\n", errors); } return hcom; } @@ -736,7 +737,7 @@ static void test_GetModemStatus(HANDLE hcom) DWORD ModemStat = 0;
ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - trace("GetCommModemStatus returned 0x%08x->%s%s%s%s\n", ModemStat, + trace("GetCommModemStatus returned 0x%08lx->%s%s%s%s\n", ModemStat, (ModemStat &MS_RLSD_ON)?"MS_RLSD_ON ":"", (ModemStat &MS_RING_ON)?"MS_RING_ON ":"", (ModemStat &MS_DSR_ON)?"MS_DSR_ON ":"", @@ -777,10 +778,10 @@ static void test_ReadTimeOut(void) LastError = GetLastError(); after = GetTickCount(); ok( res == TRUE, "A timed-out read should return TRUE\n"); - ok( LastError == 0xdeadbeef, "err=%d\n", LastError); + ok( LastError == 0xdeadbeef, "err=%ld\n", LastError); timediff = after - before; ok( timediff > TIMEOUT>>2 && timediff < TIMEOUT *2, - "Unexpected TimeOut %d, expected %d\n", timediff, TIMEOUT); + "Unexpected TimeOut %ld, expected %d\n", timediff, TIMEOUT);
CloseHandle(hcom); } @@ -802,7 +803,7 @@ static void test_waittxempty(void)
/* set a low baud rate to have ample time*/ res = GetCommState(hcom, &dcb); - ok(res, "GetCommState error %d\n", GetLastError()); + ok(res, "GetCommState error %ld\n", GetLastError()); dcb.BaudRate = baud; dcb.ByteSize = 8; dcb.Parity = NOPARITY; @@ -810,26 +811,26 @@ static void test_waittxempty(void) dcb.fDtrControl=DTR_CONTROL_ENABLE; dcb.StopBits = ONESTOPBIT; res = SetCommState(hcom, &dcb); - ok(res, "SetCommState error %d\n", GetLastError()); + ok(res, "SetCommState error %ld\n", GetLastError());
ZeroMemory( &timeouts, sizeof(timeouts)); timeouts.ReadTotalTimeoutConstant = TIMEOUT; res = SetCommTimeouts(hcom, &timeouts); - ok(res,"SetCommTimeouts error %d\n", GetLastError()); + ok(res,"SetCommTimeouts error %ld\n", GetLastError());
res = SetupComm(hcom, 1024, 1024); - ok(res, "SetUpComm error %d\n", GetLastError()); + ok(res, "SetUpComm error %ld\n", GetLastError());
/* calling SetCommMask after WriteFile leads to WaitCommEvent failures * due to timeout (no events) under testbot VMs and VirtualBox */ res = SetCommMask(hcom, EV_TXEMPTY); - ok(res, "SetCommMask error %d\n", GetLastError()); + ok(res, "SetCommMask error %ld\n", GetLastError());
SetLastError(0xdeadbeef); res = WriteFile(hcom, tbuf, sizeof(tbuf), &bytes, NULL); ok(!res, "WriteFile on an overlapped handle without ovl structure should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
S(U(ovl_write)).Offset = 0; S(U(ovl_write)).OffsetHigh = 0; @@ -839,9 +840,9 @@ static void test_waittxempty(void) res = WriteFile(hcom, tbuf, sizeof(tbuf), &bytes, &ovl_write); after = GetTickCount(); ok((!res && GetLastError() == ERROR_IO_PENDING) || (res && bytes == sizeof(tbuf)), - "WriteFile returned %d, written %u bytes, error %d\n", res, bytes, GetLastError()); - if (!res) ok(!bytes, "expected 0, got %u\n", bytes); - ok(after - before < 30, "WriteFile took %d ms to write %d Bytes at %d Baud\n", + "WriteFile returned %d, written %lu bytes, error %ld\n", res, bytes, GetLastError()); + if (!res) ok(!bytes, "expected 0, got %lu\n", bytes); + ok(after - before < 30, "WriteFile took %ld ms to write %ld Bytes at %ld Baud\n", after - before, bytes, baud); /* don't wait for WriteFile completion */
@@ -852,16 +853,16 @@ static void test_waittxempty(void) before = GetTickCount(); SetLastError(0xdeadbeef); res = WaitCommEvent(hcom, &evtmask, &ovl_wait); - ok(res || GetLastError() == ERROR_IO_PENDING, "WaitCommEvent error %d\n", GetLastError()); + ok(res || GetLastError() == ERROR_IO_PENDING, "WaitCommEvent error %ld\n", GetLastError()); after = GetTickCount(); - ok(after - before < 30, "WaitCommEvent should have returned immediately, took %d ms\n", after - before); + ok(after - before < 30, "WaitCommEvent should have returned immediately, took %ld ms\n", after - before); res = WaitForSingleObject(ovl_wait.hEvent, 1500); ok(res == WAIT_OBJECT_0, "WaitCommEvent failed with a timeout\n"); if (res == WAIT_OBJECT_0) { res = GetOverlappedResult(hcom, &ovl_wait, &bytes, FALSE); - ok(res, "GetOverlappedResult reported error %d\n", GetLastError()); - ok(bytes == sizeof(evtmask), "expected %u, written %u\n", (UINT)sizeof(evtmask), bytes); + ok(res, "GetOverlappedResult reported error %ld\n", GetLastError()); + ok(bytes == sizeof(evtmask), "expected %u, written %lu\n", (UINT)sizeof(evtmask), bytes); res = TRUE; } else @@ -869,7 +870,7 @@ static void test_waittxempty(void) /* unblock pending wait */ trace("recovering after WAIT_TIMEOUT...\n"); res = SetCommMask(hcom, EV_TXEMPTY); - ok(res, "SetCommMask error %d\n", GetLastError()); + ok(res, "SetCommMask error %ld\n", GetLastError());
res = WaitForSingleObject(ovl_wait.hEvent, TIMEOUT); ok(res == WAIT_OBJECT_0, "WaitCommEvent failed with a timeout\n"); @@ -877,19 +878,19 @@ static void test_waittxempty(void) res = FALSE; } after = GetTickCount(); - ok(res, "WaitCommEvent error %d\n", GetLastError()); - ok(evtmask & EV_TXEMPTY, "WaitCommEvent: expected EV_TXEMPTY, got %#x\n", evtmask); + ok(res, "WaitCommEvent error %ld\n", GetLastError()); + ok(evtmask & EV_TXEMPTY, "WaitCommEvent: expected EV_TXEMPTY, got %#lx\n", evtmask); CloseHandle(ovl_wait.hEvent);
timediff = after - before; - trace("WaitCommEvent for EV_TXEMPTY took %d ms (timeout 1500)\n", timediff); - ok(timediff < 1200, "WaitCommEvent used %d ms for waiting\n", timediff); + trace("WaitCommEvent for EV_TXEMPTY took %ld ms (timeout 1500)\n", timediff); + ok(timediff < 1200, "WaitCommEvent used %ld ms for waiting\n", timediff);
res = WaitForSingleObject(ovl_write.hEvent, 0); ok(res == WAIT_OBJECT_0, "WriteFile failed with a timeout\n"); res = GetOverlappedResult(hcom, &ovl_write, &bytes, FALSE); - ok(res, "GetOverlappedResult reported error %d\n", GetLastError()); - ok(bytes == sizeof(tbuf), "expected %u, written %u\n", (UINT)sizeof(tbuf), bytes); + ok(res, "GetOverlappedResult reported error %ld\n", GetLastError()); + ok(bytes == sizeof(tbuf), "expected %u, written %lu\n", (UINT)sizeof(tbuf), bytes); CloseHandle(ovl_write.hEvent);
CloseHandle(hcom); @@ -900,7 +901,7 @@ static void test_waittxempty(void) if (hcom == INVALID_HANDLE_VALUE) return;
res = SetCommMask(hcom, EV_TXEMPTY); - ok(res, "SetCommMask error %d\n", GetLastError()); + ok(res, "SetCommMask error %ld\n", GetLastError());
if (i == 0) { @@ -910,27 +911,27 @@ static void test_waittxempty(void) SetLastError(0xdeadbeef); res = WriteFile(hcom, tbuf, sizeof(tbuf), &bytes, &ovl_write); ok((!res && GetLastError() == ERROR_IO_PENDING) || (res && bytes == sizeof(tbuf)), - "WriteFile returned %d, written %u bytes, error %d\n", res, bytes, GetLastError()); - if (!res) ok(!bytes, "expected 0, got %u\n", bytes); + "WriteFile returned %d, written %lu bytes, error %ld\n", res, bytes, GetLastError()); + if (!res) ok(!bytes, "expected 0, got %lu\n", bytes);
ClearCommError(hcom, &errors, &stat); - ok(stat.cbInQue == 0, "InQueue should be empty, got %d bytes\n", stat.cbInQue); + ok(stat.cbInQue == 0, "InQueue should be empty, got %ld bytes\n", stat.cbInQue); ok(stat.cbOutQue != 0 || broken(stat.cbOutQue == 0) /* VM */, "OutQueue should not be empty\n"); - ok(errors == 0, "ClearCommErrors: Unexpected error 0x%08x\n", errors); + ok(errors == 0, "ClearCommErrors: Unexpected error 0x%08lx\n", errors);
res = GetOverlappedResult(hcom, &ovl_write, &bytes, TRUE); - ok(res, "GetOverlappedResult reported error %d\n", GetLastError()); - ok(bytes == sizeof(tbuf), "expected %u, written %u\n", (UINT)sizeof(tbuf), bytes); + ok(res, "GetOverlappedResult reported error %ld\n", GetLastError()); + ok(bytes == sizeof(tbuf), "expected %u, written %lu\n", (UINT)sizeof(tbuf), bytes); CloseHandle(ovl_write.hEvent);
res = FlushFileBuffers(hcom); - ok(res, "FlushFileBuffers error %d\n", GetLastError()); + ok(res, "FlushFileBuffers error %ld\n", GetLastError()); }
ClearCommError(hcom, &errors, &stat); - ok(stat.cbInQue == 0, "InQueue should be empty, got %d bytes\n", stat.cbInQue); - ok(stat.cbOutQue == 0, "OutQueue should be empty, got %d bytes\n", stat.cbOutQue); - ok(errors == 0, "ClearCommErrors: Unexpected error 0x%08x\n", errors); + ok(stat.cbInQue == 0, "InQueue should be empty, got %ld bytes\n", stat.cbInQue); + ok(stat.cbOutQue == 0, "OutQueue should be empty, got %ld bytes\n", stat.cbOutQue); + ok(errors == 0, "ClearCommErrors: Unexpected error 0x%08lx\n", errors);
S(U(ovl_wait)).Offset = 0; S(U(ovl_wait)).OffsetHigh = 0; @@ -939,7 +940,7 @@ static void test_waittxempty(void) SetLastError(0xdeadbeef); res = WaitCommEvent(hcom, &evtmask, &ovl_wait); ok(res /* busy system */ || GetLastError() == ERROR_IO_PENDING, - "%d: WaitCommEvent error %d\n", i, GetLastError()); + "%ld: WaitCommEvent error %ld\n", i, GetLastError());
res = WaitForSingleObject(ovl_wait.hEvent, TIMEOUT); if (i == 0) @@ -949,14 +950,14 @@ static void test_waittxempty(void) if (res == WAIT_OBJECT_0) { res = GetOverlappedResult(hcom, &ovl_wait, &bytes, FALSE); - ok(res, "GetOverlappedResult reported error %d\n", GetLastError()); - ok(bytes == sizeof(evtmask), "expected %u, written %u\n", (UINT)sizeof(evtmask), bytes); - ok(res, "WaitCommEvent error %d\n", GetLastError()); - ok(evtmask & EV_TXEMPTY, "WaitCommEvent: expected EV_TXEMPTY, got %#x\n", evtmask); + ok(res, "GetOverlappedResult reported error %ld\n", GetLastError()); + ok(bytes == sizeof(evtmask), "expected %u, written %lu\n", (UINT)sizeof(evtmask), bytes); + ok(res, "WaitCommEvent error %ld\n", GetLastError()); + ok(evtmask & EV_TXEMPTY, "WaitCommEvent: expected EV_TXEMPTY, got %#lx\n", evtmask); } else { - ok(!evtmask, "WaitCommEvent: expected 0, got %#x\n", evtmask); + ok(!evtmask, "WaitCommEvent: expected 0, got %#lx\n", evtmask);
S(U(ovl_wait2)).Offset = 0; S(U(ovl_wait2)).OffsetHigh = 0; @@ -964,13 +965,13 @@ static void test_waittxempty(void) SetLastError(0xdeadbeef); res = WaitCommEvent(hcom, &evtmask, &ovl_wait2); ok(!res, "WaitCommEvent should fail if there is a pending wait\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); CloseHandle(ovl_wait2.hEvent);
/* unblock pending wait */ trace("recovering after WAIT_TIMEOUT...\n"); res = SetCommMask(hcom, EV_TXEMPTY); - ok(res, "SetCommMask error %d\n", GetLastError()); + ok(res, "SetCommMask error %ld\n", GetLastError());
res = WaitForSingleObject(ovl_wait.hEvent, TIMEOUT); ok(res == WAIT_OBJECT_0, "WaitCommEvent failed with a timeout\n"); @@ -992,9 +993,9 @@ static void test_ClearCommError(void) if (hcom == INVALID_HANDLE_VALUE) return;
ok(ClearCommError(hcom, &errors, &lpStat), "ClearCommError failed\n"); - ok(lpStat.cbInQue == 0, "Unexpected %d chars in InQueue\n", lpStat.cbInQue); - ok(lpStat.cbOutQue == 0, "Unexpected %d chars in OutQueue\n", lpStat.cbOutQue); - ok(errors == 0, "ClearCommErrors: Unexpected error 0x%08x\n", errors); + ok(lpStat.cbInQue == 0, "Unexpected %ld chars in InQueue\n", lpStat.cbInQue); + ok(lpStat.cbOutQue == 0, "Unexpected %ld chars in OutQueue\n", lpStat.cbOutQue); + ok(errors == 0, "ClearCommErrors: Unexpected error 0x%08lx\n", errors);
CloseHandle(hcom); } @@ -1012,7 +1013,7 @@ static void test_non_pending_errors(void) dcb.ByteSize = 255; /* likely bogus */ ok(!SetCommState(hcom, &dcb), "SetCommState should have failed\n"); ok(ClearCommError(hcom, &err, NULL), "ClearCommError should succeed\n"); - ok(!(err & CE_MODE), "ClearCommError shouldn't set CE_MODE byte in this case (%x)\n", err); + ok(!(err & CE_MODE), "ClearCommError shouldn't set CE_MODE byte in this case (%lx)\n", err);
CloseHandle(hcom); } @@ -1051,20 +1052,20 @@ static void test_LoopbackRead(void) before = GetTickCount(); ok(WriteFile(hcom,tbuf,sizeof(tbuf),&written, NULL), "WriteFile failed\n"); after = GetTickCount(); - ok(written == sizeof(tbuf),"WriteFile %d bytes written\n", written); + ok(written == sizeof(tbuf),"WriteFile %ld bytes written\n", written); diff = after -before;
/* make sure all bytes are written, so Readfile will succeed in one call*/ ok(WaitCommEvent(hcom, &evtmask, NULL), "WaitCommEvent failed\n"); before = GetTickCount(); ok(evtmask == EV_TXEMPTY, - "WaitCommEvent: Unexpected EvtMask 0x%08x, expected 0x%08x\n", + "WaitCommEvent: Unexpected EvtMask 0x%08lx, expected 0x%08x\n", evtmask, EV_TXEMPTY); - trace("Write %d ms WaitCommEvent EV_TXEMPTY %d ms\n", diff, before- after); + trace("Write %ld ms WaitCommEvent EV_TXEMPTY %ld ms\n", diff, before- after);
read=0; ok(ReadFile(hcom, rbuf, sizeof(rbuf), &read, NULL), "Readfile failed\n"); - ok(read == sizeof(tbuf),"ReadFile read %d bytes, expected "%s"\n", read,rbuf); + ok(read == sizeof(tbuf),"ReadFile read %ld bytes, expected "%s"\n", read,rbuf);
/* Now do the same with a slower Baud rate. As we request more characters than written, we will hit the timeout @@ -1081,22 +1082,22 @@ static void test_LoopbackRead(void)
ok(SetCommMask(hcom, EV_RXCHAR), "SetCommMask failed\n"); ok(WriteFile(hcom,tbuf,sizeof(tbuf),&written, NULL), "WriteFile failed\n"); - ok(written == sizeof(tbuf),"WriteFile %d bytes written\n", written); + ok(written == sizeof(tbuf),"WriteFile %ld bytes written\n", written);
trace("WaitCommEventEV_RXCHAR\n"); ok(WaitCommEvent(hcom, &evtmask, NULL), "WaitCommEvent failed\n"); - ok(evtmask == EV_RXCHAR, "WaitCommEvent: Unexpected EvtMask 0x%08x, expected 0x%08x\n", + ok(evtmask == EV_RXCHAR, "WaitCommEvent: Unexpected EvtMask 0x%08lx, expected 0x%08x\n", evtmask, EV_RXCHAR);
before = GetTickCount(); res = ReadFile(hcom, rbuf, sizeof(rbuf), &read, NULL); after = GetTickCount(); ok(res, "Readfile failed\n"); - ok(read == sizeof(tbuf),"ReadFile read %d bytes\n", read); + ok(read == sizeof(tbuf),"ReadFile read %ld bytes\n", read); diff = after - before; - trace("Readfile for %d chars took %d ms\n", read, diff); + trace("Readfile for %ld chars took %ld ms\n", read, diff); ok( (diff > TIMEOUT - TIMEDELTA) && (diff < TIMEOUT + TIMEDELTA), - "Timedout Wait took %d ms, expected around %d\n", diff, TIMEOUT); + "Timedout Wait took %ld ms, expected around %d\n", diff, TIMEOUT);
/* now do a plain read with slow speed * This will result in several low level reads and a timeout to happen @@ -1117,8 +1118,8 @@ static void test_LoopbackRead(void) } while ((read < sizeof(tbuf)) && (i <10)); after = GetTickCount(); - ok( read == sizeof(tbuf),"ReadFile read %d bytes\n", read); - trace("Plain Read for %d char at %d baud took %d ms\n", read, SLOWBAUD, after-before); + ok( read == sizeof(tbuf),"ReadFile read %ld bytes\n", read); + trace("Plain Read for %ld char at %d baud took %ld ms\n", read, SLOWBAUD, after-before);
CloseHandle(hcom); } @@ -1149,11 +1150,11 @@ static void test_LoopbackCtsRts(void) { ok(EscapeCommFunction(hcom, CLRRTS), "EscapeCommFunction failed to clear RTS\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_CTS_ON) == 0, "CTS didn't react: 0x%04x, expected 0x%04x\n", + ok ((ModemStat & MS_CTS_ON) == 0, "CTS didn't react: 0x%04lx, expected 0x%04lx\n", ModemStat, (defaultStat & ~MS_CTS_ON)); ok(EscapeCommFunction(hcom, SETRTS), "EscapeCommFunction failed to clear RTS\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore CTS: 0x%04x, expected 0x%04x\n", + ok (ModemStat == defaultStat, "Failed to restore CTS: 0x%04lx, expected 0x%04lx\n", ModemStat, defaultStat); } else @@ -1161,11 +1162,11 @@ static void test_LoopbackCtsRts(void) ok(EscapeCommFunction(hcom, SETRTS), "EscapeCommFunction failed to set RTS\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); ok ((ModemStat & MS_CTS_ON) == MS_CTS_ON, - "CTS didn't react: 0x%04x, expected 0x%04x\n", + "CTS didn't react: 0x%04lx, expected 0x%04lx\n", ModemStat, (defaultStat | MS_CTS_ON)); ok(EscapeCommFunction(hcom, CLRRTS), "EscapeCommFunction failed to clear RTS\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore CTS: 0x%04x, expected 0x%04x\n", + ok (ModemStat == defaultStat, "Failed to restore CTS: 0x%04lx, expected 0x%04lx\n", ModemStat, defaultStat); }
@@ -1197,11 +1198,11 @@ static void test_LoopbackDtrDcd(void) { ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_RLSD_ON) == 0, "RLSD didn't react: 0x%04x, expected 0x%04x\n", + ok ((ModemStat & MS_RLSD_ON) == 0, "RLSD didn't react: 0x%04lx, expected 0x%04lx\n", ModemStat, (defaultStat & ~MS_RLSD_ON)); ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore RLSD: 0x%04x, expected 0x%04x\n", + ok (ModemStat == defaultStat, "Failed to restore RLSD: 0x%04lx, expected 0x%04lx\n", ModemStat, defaultStat); } else @@ -1209,11 +1210,11 @@ static void test_LoopbackDtrDcd(void) ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); ok ((ModemStat & MS_RLSD_ON) == MS_RLSD_ON, - "RLSD didn't react: 0x%04x, expected 0x%04x\n", + "RLSD didn't react: 0x%04lx, expected 0x%04lx\n", ModemStat, (defaultStat | MS_RLSD_ON)); ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore RLSD: 0x%04x, expected 0x%04x\n", + ok (ModemStat == defaultStat, "Failed to restore RLSD: 0x%04lx, expected 0x%04lx\n", ModemStat, defaultStat); }
@@ -1245,11 +1246,11 @@ static void test_LoopbackDtrDsr(void) { ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_DSR_ON) == 0, "CTS didn't react: 0x%04x, expected 0x%04x\n", + ok ((ModemStat & MS_DSR_ON) == 0, "CTS didn't react: 0x%04lx, expected 0x%04lx\n", ModemStat, (defaultStat & ~MS_DSR_ON)); ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to clear DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore DSR: 0x%04x, expected 0x%04x\n", + ok (ModemStat == defaultStat, "Failed to restore DSR: 0x%04lx, expected 0x%04lx\n", ModemStat, defaultStat); } else @@ -1257,11 +1258,11 @@ static void test_LoopbackDtrDsr(void) ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); ok ((ModemStat & MS_DSR_ON) == MS_DSR_ON, - "CTS didn't react: 0x%04x,expected 0x%04x\n", + "CTS didn't react: 0x%04lx,expected 0x%04lx\n", ModemStat, (defaultStat | MS_DSR_ON)); ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore DSR: 0x%04x, expected 0x%04x\n", + ok (ModemStat == defaultStat, "Failed to restore DSR: 0x%04lx, expected 0x%04lx\n", ModemStat, defaultStat); }
@@ -1293,11 +1294,11 @@ static void test_LoopbackDtrRing(void) { ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_RING_ON) == 0, "RING didn't react: 0x%04x, expected 0x%04x\n", + ok ((ModemStat & MS_RING_ON) == 0, "RING didn't react: 0x%04lx, expected 0x%04lx\n", ModemStat, (defaultStat & ~MS_RING_ON)); ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore RING: 0x%04x, expected 0x%04x\n", + ok (ModemStat == defaultStat, "Failed to restore RING: 0x%04lx, expected 0x%04lx\n", ModemStat, defaultStat); } else @@ -1305,11 +1306,11 @@ static void test_LoopbackDtrRing(void) ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); ok ((ModemStat & MS_RING_ON) == MS_RING_ON, - "RING didn't react: 0x%04x,expected 0x%04x\n", + "RING didn't react: 0x%04lx,expected 0x%04lx\n", ModemStat, (defaultStat | MS_RING_ON)); ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore RING: 0x%04x, expected 0x%04x\n", + ok (ModemStat == defaultStat, "Failed to restore RING: 0x%04lx, expected 0x%04lx\n", ModemStat, defaultStat); }
@@ -1342,7 +1343,7 @@ static void test_WaitRx(void) overlapped.hEvent = hComPortEvent;
hComWriteEvent = CreateEventW( NULL, TRUE, FALSE, NULL ); - ok(hComWriteEvent != NULL, "CreateEvent res %d\n", GetLastError()); + ok(hComWriteEvent != NULL, "CreateEvent res %ld\n", GetLastError()); ZeroMemory( &overlapped_w, sizeof(overlapped_w)); overlapped_w.hEvent = hComWriteEvent;
@@ -1350,47 +1351,47 @@ static void test_WaitRx(void) success_wait = WaitCommEvent(hcom, &evtmask, &overlapped); err_wait = GetLastError(); after = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x\n", success_wait, err_wait, evtmask); + trace("Success 0x%08lx err %ld evtmask 0x%08lx\n", success_wait, err_wait, evtmask); ok(success_wait || err_wait == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); trace("overlapped WaitCommEvent returned.\n");
success_write= WriteFile(hcom, "X", 1, &written, &overlapped_w); err_write = GetLastError(); ok(success_write || err_write == ERROR_IO_PENDING, - "overlapped WriteFile failed, err %d\n", + "overlapped WriteFile failed, err %ld\n", err_write);
if (!success_write && (err_write == ERROR_IO_PENDING)) { success_write = WaitForSingleObjectEx(hComWriteEvent, TIMEOUT, TRUE); err_write = GetLastError(); - ok(success_write == WAIT_OBJECT_0, "WaitForSingleObjectEx, res %d, err %d\n", + ok(success_write == WAIT_OBJECT_0, "WaitForSingleObjectEx, res %ld, err %ld\n", success_write, err_write); } Sleep(TIMEOUT >>1); success_write = GetOverlappedResult(hcom, &overlapped_w, &written, FALSE); err_write = GetLastError();
- trace("Write after Wait res 0x%08x err %d\n",success_write, err_write); - ok(success_write && written ==1, "Write after Wait res 0x%08x err %d\n", + trace("Write after Wait res 0x%08lx err %ld\n",success_write, err_write); + ok(success_write && written ==1, "Write after Wait res 0x%08lx err %ld\n", success_write, err_write);
if (!success_wait && (err_wait == ERROR_IO_PENDING)) { success_wait = WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE); err_wait = GetLastError(); - ok(success_wait == WAIT_OBJECT_0, "wait hComPortEvent, res 0x%08x, err %d\n", + ok(success_wait == WAIT_OBJECT_0, "wait hComPortEvent, res 0x%08lx, err %ld\n", success_wait, err_wait); } success_wait = GetOverlappedResult(hcom, &overlapped, &written, FALSE); err_wait = GetLastError(); after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", + trace("Success 0x%08lx err %ld evtmask 0x%08lx diff1 %ld, diff2 %ld\n", success_wait, err_wait, evtmask, after-before, after1-before);
- ok(evtmask & EV_RXCHAR, "Detect EV_RXCHAR: 0x%08x, expected 0x%08x\n", + ok(evtmask & EV_RXCHAR, "Detect EV_RXCHAR: 0x%08lx, expected 0x%08x\n", evtmask, EV_RXCHAR); diff = after1 - before; ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); + "Unexpected time %ld, expected around %d\n", diff, TIMEOUT>>1);
CloseHandle(hcom); } @@ -1407,13 +1408,13 @@ static DWORD CALLBACK toggle_ctlLine(LPVOID arg) HANDLE hComPortEvent = (HANDLE) args[3]; DWORD success, err;
- trace("toggle_ctlLine timeout %d ctl 0x%08x handle %p\n", timeout, ctl, hcom ); + trace("toggle_ctlLine timeout %ld ctl 0x%08lx handle %p\n", timeout, ctl, hcom ); Sleep(timeout); - ok(EscapeCommFunction(hcom, ctl),"EscapeCommFunction 0x%08x failed\n", ctl); + ok(EscapeCommFunction(hcom, ctl),"EscapeCommFunction 0x%08lx failed\n", ctl); trace("toggle_ctline done\n"); success = WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE); err = GetLastError(); - trace("toggle_ctline WaitForSingleObjectEx res 0x%08x err %d\n", + trace("toggle_ctline WaitForSingleObjectEx res 0x%08lx err %ld\n", success, err); return 0; } @@ -1453,7 +1454,7 @@ static void test_WaitCts(void) args[1] = SETRTS; args[2]=(DWORD_PTR)hcom;
- trace("test_WaitCts timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); + trace("test_WaitCts timeout %Id clt 0x%08Ix handle %p\n",args[0], args[1], hcom);
ok(SetCommMask(hcom, EV_CTS), "SetCommMask failed\n"); hComPortEvent = CreateEventW( NULL, TRUE, FALSE, NULL ); @@ -1472,7 +1473,7 @@ static void test_WaitCts(void) err = GetLastError(); after = GetTickCount();
- trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); + trace("Success 0x%08lx err %ld evtmask 0x%08lx\n", success, err, evtmask); ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); trace("overlapped WaitCommEvent returned.\n"); if (!success && (err == ERROR_IO_PENDING)) @@ -1481,10 +1482,10 @@ static void test_WaitCts(void) success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); err = GetLastError(); after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", + trace("Success 0x%08lx err %ld evtmask 0x%08lx diff1 %ld, diff2 %ld\n", success, err, evtmask, after-before, after1-before);
- ok(evtmask & EV_CTS, "Failed to detect EV_CTS: 0x%08x, expected 0x%08x\n", + ok(evtmask & EV_CTS, "Failed to detect EV_CTS: 0x%08lx, expected 0x%08x\n", evtmask, EV_CTS); ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); if(defaultStat & MS_CTS_ON) @@ -1494,7 +1495,7 @@ static void test_WaitCts(void)
diff = after1 - before; ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); + "Unexpected time %ld, expected around %d\n", diff, TIMEOUT>>1);
/*restore RTS Settings*/ if(defaultStat & MS_CTS_ON) @@ -1516,7 +1517,7 @@ static DWORD CALLBACK reset_CommMask(LPVOID arg) DWORD timeout = args[0]; HANDLE hcom = (HANDLE) args[1];
- trace(" Changing CommMask on the fly for handle %p after timeout %d\n", + trace(" Changing CommMask on the fly for handle %p after timeout %ld\n", hcom, timeout); Sleep(timeout); ok(SetCommMask(hcom, 0),"SetCommMask %p failed\n", hcom); @@ -1549,7 +1550,7 @@ static void test_AbortWaitCts(void) args[0]= TIMEOUT >>1; args[1]= (DWORD_PTR)hcom;
- trace("test_AbortWaitCts timeout %ld handle %p\n",args[0], hcom); + trace("test_AbortWaitCts timeout %Id handle %p\n",args[0], hcom);
ok(SetCommMask(hcom, EV_CTS), "SetCommMask failed\n"); hComPortEvent = CreateEventW( NULL, TRUE, FALSE, NULL ); @@ -1567,7 +1568,7 @@ static void test_AbortWaitCts(void) err = GetLastError(); after = GetTickCount();
- trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); + trace("Success 0x%08lx err %ld evtmask 0x%08lx\n", success, err, evtmask); ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); trace("overlapped WaitCommEvent returned.\n"); if (!success && (err == ERROR_IO_PENDING)) @@ -1576,15 +1577,15 @@ static void test_AbortWaitCts(void) success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); err = GetLastError(); after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", + trace("Success 0x%08lx err %ld evtmask 0x%08lx diff1 %ld, diff2 %ld\n", success, err, evtmask, after-before, after1-before);
- ok(evtmask == 0, "Incorrect EventMask 0x%08x returned on Wait aborted bu SetCommMask, expected 0x%08x\n", + ok(evtmask == 0, "Incorrect EventMask 0x%08lx returned on Wait aborted bu SetCommMask, expected 0x%08x\n", evtmask, 0); ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); diff = after1 - before; ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); + "Unexpected time %ld, expected around %d\n", diff, TIMEOUT>>1);
CloseHandle(hcom); ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" ); @@ -1623,7 +1624,7 @@ static void test_WaitDsr(void) args[1] = SETDTR; args[2]= (DWORD_PTR)hcom;
- trace("test_WaitDsr timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); + trace("test_WaitDsr timeout %Id clt 0x%08Ix handle %p\n",args[0], args[1], hcom);
ok(SetCommMask(hcom, EV_DSR), "SetCommMask failed\n"); hComPortEvent = CreateEventW( NULL, TRUE, FALSE, NULL ); @@ -1638,7 +1639,7 @@ static void test_WaitDsr(void) err = GetLastError(); after = GetTickCount();
- trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); + trace("Success 0x%08lx err %ld evtmask 0x%08lx\n", success, err, evtmask); ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); trace("overlapped WaitCommEvent returned.\n"); if (!success && (err == ERROR_IO_PENDING)) @@ -1647,10 +1648,10 @@ static void test_WaitDsr(void) success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); err = GetLastError(); after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", + trace("Success 0x%08lx err %ld evtmask 0x%08lx diff1 %ld, diff2 %ld\n", success, err, evtmask, after-before, after1-before);
- ok(evtmask & EV_DSR, "Failed to detect EV_DSR: 0x%08x, expected 0x%08x\n", + ok(evtmask & EV_DSR, "Failed to detect EV_DSR: 0x%08lx, expected 0x%08x\n", evtmask, EV_DSR); ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); if(defaultStat & MS_DSR_ON) @@ -1660,7 +1661,7 @@ static void test_WaitDsr(void)
diff = after1 - before; ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); + "Unexpected time %ld, expected around %d\n", diff, TIMEOUT>>1);
/*restore RTS Settings*/ if(defaultStat & MS_DSR_ON) @@ -1711,7 +1712,7 @@ static void test_WaitRing(void) args[1] = SETDTR; args[2]=(DWORD_PTR) hcom;
- trace("test_WaitRing timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); + trace("test_WaitRing timeout %Id clt 0x%08Ix handle %p\n",args[0], args[1], hcom);
ok(SetCommMask(hcom, EV_RING), "SetCommMask failed\n"); hComPortEvent = CreateEventW( NULL, TRUE, FALSE, NULL ); @@ -1726,7 +1727,7 @@ static void test_WaitRing(void) err = GetLastError(); after = GetTickCount();
- trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); + trace("Success 0x%08lx err %ld evtmask 0x%08lx\n", success, err, evtmask); ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); trace("overlapped WaitCommEvent returned.\n"); if (!success && (err == ERROR_IO_PENDING)) @@ -1735,10 +1736,10 @@ static void test_WaitRing(void) success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); err = GetLastError(); after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", + trace("Success 0x%08lx err %ld evtmask 0x%08lx diff1 %ld, diff2 %ld\n", success, err, evtmask, after-before, after1-before);
- ok(evtmask & EV_RING, "Failed to detect EV_RING: 0x%08x, expected 0x%08x\n", + ok(evtmask & EV_RING, "Failed to detect EV_RING: 0x%08lx, expected 0x%08x\n", evtmask, EV_RING); ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); if(defaultStat & MS_RING_ON) @@ -1748,7 +1749,7 @@ static void test_WaitRing(void)
diff = after1 - before; ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); + "Unexpected time %ld, expected around %d\n", diff, TIMEOUT>>1);
/*restore RTS Settings*/ if(defaultStat & MS_RING_ON) @@ -1792,7 +1793,7 @@ static void test_WaitDcd(void) args[1] = SETDTR; args[2]= (DWORD_PTR)hcom;
- trace("test_WaitDcd timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); + trace("test_WaitDcd timeout %Id clt 0x%08Ix handle %p\n",args[0], args[1], hcom);
ok(SetCommMask(hcom, EV_RLSD), "SetCommMask failed\n"); hComPortEvent = CreateEventW( NULL, TRUE, FALSE, NULL ); @@ -1807,7 +1808,7 @@ static void test_WaitDcd(void) err = GetLastError(); after = GetTickCount();
- trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); + trace("Success 0x%08lx err %ld evtmask 0x%08lx\n", success, err, evtmask); ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); trace("overlapped WaitCommEvent returned.\n"); if (!success && (err == ERROR_IO_PENDING)) @@ -1816,10 +1817,10 @@ static void test_WaitDcd(void) success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); err = GetLastError(); after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", + trace("Success 0x%08lx err %ld evtmask 0x%08lx diff1 %ld, diff2 %ld\n", success, err, evtmask, after-before, after1-before);
- ok(evtmask & EV_RLSD, "Failed to detect EV_RLSD: 0x%08x, expected 0x%08x\n", + ok(evtmask & EV_RLSD, "Failed to detect EV_RLSD: 0x%08lx, expected 0x%08x\n", evtmask, EV_RLSD); ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); if(defaultStat & MS_RLSD_ON) @@ -1829,7 +1830,7 @@ static void test_WaitDcd(void)
diff = after1 - before; ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); + "Unexpected time %ld, expected around %d\n", diff, TIMEOUT>>1);
/*restore RTS Settings*/ if(defaultStat & MS_RLSD_ON) @@ -1851,7 +1852,7 @@ static DWORD CALLBACK set_CommBreak(LPVOID arg) DWORD timeout = args[0]; HANDLE hcom = (HANDLE) args[1];
- trace("SetCommBreak for handle %p after timeout %d\n", + trace("SetCommBreak for handle %p after timeout %ld\n", hcom, timeout); Sleep(timeout); ok(SetCommBreak(hcom),"SetCommBreak %p failed\n", hcom); @@ -1895,28 +1896,28 @@ static void test_WaitBreak(void) err = GetLastError(); after = GetTickCount();
- trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); + trace("Success 0x%08lx err %ld evtmask 0x%08lx\n", success, err, evtmask); ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); trace("overlapped WaitCommEvent returned.\n");
if (!success && (err == ERROR_IO_PENDING)) { success = WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE); - ok(!success, "wait hComPortEvent res %d\n", GetLastError()); + ok(!success, "wait hComPortEvent res %ld\n", GetLastError()); } success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); err = GetLastError(); after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", + trace("Success 0x%08lx err %ld evtmask 0x%08lx diff1 %ld, diff2 %ld\n", success, err, evtmask, after-before, after1-before);
- ok(evtmask & EV_BREAK, "Failed to detect EV_BREAK: 0x%08x, expected 0x%08x\n", + ok(evtmask & EV_BREAK, "Failed to detect EV_BREAK: 0x%08lx, expected 0x%08x\n", evtmask, EV_BREAK); ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n");
diff = after1 - before; ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); + "Unexpected time %ld, expected around %d\n", diff, TIMEOUT>>1);
ok(ClearCommBreak(hcom), "ClearCommBreak failed\n");
@@ -1932,7 +1933,7 @@ static void test_stdio(void) /* cygwin tries this to determine the stdin handle type */ ok( !GetCommState( GetStdHandle(STD_INPUT_HANDLE), &dcb ), "GetCommState succeeded on stdin\n" ); ok( GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_INVALID_FUNCTION, - "got error %u\n", GetLastError() ); + "got error %lu\n", GetLastError() ); }
static void test_WaitCommEvent(void) @@ -1947,7 +1948,7 @@ static void test_WaitCommEvent(void) test_GetModemStatus(hcom);
ret = SetCommMask(hcom, 0x1fff); - ok(ret, "SetCommMask error %d\n", GetLastError()); + ok(ret, "SetCommMask error %ld\n", GetLastError());
S(U(ovl_wait)).Offset = 0; S(U(ovl_wait)).OffsetHigh = 0; @@ -1961,7 +1962,7 @@ static void test_WaitCommEvent(void) evtmask = 0; SetLastError(0xdeadbeef); ret = WaitCommEvent(hcom, &evtmask, &ovl_wait); - ok(!ret && GetLastError() == ERROR_IO_PENDING, "WaitCommEvent returned %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_IO_PENDING, "WaitCommEvent returned %ld, error %ld\n", ret, GetLastError()); if (GetLastError() != ERROR_IO_PENDING) goto done; /* no point in further testing */ for (;;) { @@ -1971,9 +1972,9 @@ static void test_WaitCommEvent(void) { last_event_time = after; ret = GetOverlappedResult(hcom, &ovl_wait, &bytes, FALSE); - ok(ret, "GetOverlappedResult reported error %d\n", GetLastError()); - ok(bytes == sizeof(evtmask), "expected %u, written %u\n", (UINT)sizeof(evtmask), bytes); - trace("WaitCommEvent: got events %#x\n", evtmask); + ok(ret, "GetOverlappedResult reported error %ld\n", GetLastError()); + ok(bytes == sizeof(evtmask), "expected %u, written %lu\n", (UINT)sizeof(evtmask), bytes); + trace("WaitCommEvent: got events %#lx\n", evtmask); test_GetModemStatus(hcom); break; } @@ -1999,17 +2000,17 @@ static void test_FlushFileBuffers(void) if (hcom == INVALID_HANDLE_VALUE) return;
ret = WriteFile(hcom, "\0\0\0\0\0\0\0", 7, &bytes, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - ok(bytes == 7, "expected 7, got %u\n", bytes); + ok(ret, "WriteFile error %ld\n", GetLastError()); + ok(bytes == 7, "expected 7, got %lu\n", bytes);
ret = FlushFileBuffers(hcom); - ok(ret, "FlushFileBuffers error %d\n", GetLastError()); + ok(ret, "FlushFileBuffers error %ld\n", GetLastError());
ret = ClearCommError(hcom, &errors, &stat); - ok(ret, "ClearCommError error %d\n", GetLastError()); - ok(stat.cbInQue == 0, "expected 0, got %d bytes in InQueue\n", stat.cbInQue); - ok(stat.cbOutQue == 0, "expected 0, got %d bytes in OutQueue\n", stat.cbOutQue); - ok(errors == 0, "expected errors 0, got %#x\n", errors); + ok(ret, "ClearCommError error %ld\n", GetLastError()); + ok(stat.cbInQue == 0, "expected 0, got %ld bytes in InQueue\n", stat.cbInQue); + ok(stat.cbOutQue == 0, "expected 0, got %ld bytes in OutQueue\n", stat.cbOutQue); + ok(errors == 0, "expected errors 0, got %#lx\n", errors);
CloseHandle(hcom); } @@ -2037,7 +2038,7 @@ static void test_read_write(void) if (hcom == INVALID_HANDLE_VALUE) return;
ret = GetCommState(hcom, &dcb); - ok(ret, "GetCommState error %d\n", GetLastError()); + ok(ret, "GetCommState error %ld\n", GetLastError()); dcb.BaudRate = 9600; dcb.ByteSize = 8; dcb.Parity = NOPARITY; @@ -2045,29 +2046,29 @@ static void test_read_write(void) dcb.fDtrControl = DTR_CONTROL_ENABLE; dcb.StopBits = ONESTOPBIT; ret = SetCommState(hcom, &dcb); - ok(ret, "SetCommState error %d\n", GetLastError()); + ok(ret, "SetCommState error %ld\n", GetLastError());
memset(&timeouts, 0, sizeof(timeouts)); timeouts.ReadTotalTimeoutConstant = TIMEOUT; ret = SetCommTimeouts(hcom, &timeouts); - ok(ret,"SetCommTimeouts error %d\n", GetLastError()); + ok(ret,"SetCommTimeouts error %ld\n", GetLastError());
ret = SetupComm(hcom, 1024, 1024); - ok(ret, "SetUpComm error %d\n", GetLastError()); + ok(ret, "SetUpComm error %ld\n", GetLastError());
bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = WriteFile(hcom, atz, 0, &bytes, NULL); ok(!ret, "WriteFile should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ok(bytes == 0, "bytes %u\n", bytes); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); + ok(bytes == 0, "bytes %lu\n", bytes);
U(iob).Status = -1; iob.Information = -1; status = pNtWriteFile(hcom, 0, NULL, NULL, &iob, atz, 0, NULL, NULL); - ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#x\n", status); - ok(U(iob).Status == -1, "expected -1, got %#x\n", U(iob).Status); - ok(iob.Information == -1, "expected -1, got %ld\n", iob.Information); + ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#lx\n", status); + ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status); + ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
for (i = -20; i < 20; i++) { @@ -2077,15 +2078,15 @@ static void test_read_write(void) status = pNtWriteFile(hcom, 0, NULL, NULL, &iob, atz, 0, &offset, NULL); if (i >= 0 || i == -1) { - ok(status == STATUS_SUCCESS, "%d: expected STATUS_SUCCESS, got %#x\n", i, status); - ok(U(iob).Status == STATUS_SUCCESS, "%d: expected STATUS_SUCCESS, got %#x\n", i, U(iob).Status); - ok(iob.Information == 0, "%d: expected 0, got %lu\n", i, iob.Information); + ok(status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, status); + ok(U(iob).Status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, U(iob).Status); + ok(iob.Information == 0, "%ld: expected 0, got %Iu\n", i, iob.Information); } else { - ok(status == STATUS_INVALID_PARAMETER, "%d: expected STATUS_INVALID_PARAMETER, got %#x\n", i, status); - ok(U(iob).Status == -1, "%d: expected -1, got %#x\n", i, U(iob).Status); - ok(iob.Information == -1, "%d: expected -1, got %ld\n", i, iob.Information); + ok(status == STATUS_INVALID_PARAMETER, "%ld: expected STATUS_INVALID_PARAMETER, got %#lx\n", i, status); + ok(U(iob).Status == -1, "%ld: expected -1, got %#lx\n", i, U(iob).Status); + ok(iob.Information == -1, "%ld: expected -1, got %Id\n", i, iob.Information); } }
@@ -2093,7 +2094,7 @@ static void test_read_write(void) iob.Information = -1; offset.QuadPart = 0; status = pNtWriteFile(hcom, 0, NULL, NULL, &iob, atz, sizeof(atz), &offset, NULL); - ok(status == STATUS_PENDING || status == STATUS_SUCCESS, "expected STATUS_PENDING or STATUS_SUCCESS, got %#x\n", status); + ok(status == STATUS_PENDING || status == STATUS_SUCCESS, "expected STATUS_PENDING or STATUS_SUCCESS, got %#lx\n", status); /* Under Windows checking IO_STATUS_BLOCK right after the call leads * to races, iob.Status is either -1 or STATUS_SUCCESS, which means * that it's set only when the operation completes. @@ -2105,12 +2106,12 @@ static void test_read_write(void) CloseHandle(hcom); return; } - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject error %d\n", ret); - ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#x\n", U(iob).Status); - ok(iob.Information == sizeof(atz), "expected sizeof(atz), got %lu\n", iob.Information); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject error %ld\n", ret); + ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status); + ok(iob.Information == sizeof(atz), "expected sizeof(atz), got %Iu\n", iob.Information);
ret = SetCommMask(hcom, EV_RXCHAR); - ok(ret, "SetCommMask error %d\n", GetLastError()); + ok(ret, "SetCommMask error %ld\n", GetLastError());
S(U(ovl_wait)).Offset = 0; S(U(ovl_wait)).OffsetHigh = 0; @@ -2124,7 +2125,7 @@ static void test_read_write(void) evtmask = 0; SetLastError(0xdeadbeef); ret = WaitCommEvent(hcom, &evtmask, &ovl_wait); - ok(!ret && GetLastError() == ERROR_IO_PENDING, "WaitCommEvent returned %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_IO_PENDING, "WaitCommEvent returned %ld, error %ld\n", ret, GetLastError()); if (GetLastError() != ERROR_IO_PENDING) goto done; /* no point in further testing */ for (;;) { @@ -2136,23 +2137,23 @@ static void test_read_write(void)
last_event_time = after; ret = GetOverlappedResult(hcom, &ovl_wait, &bytes, FALSE); - ok(ret, "GetOverlappedResult reported error %d\n", GetLastError()); - ok(bytes == sizeof(evtmask), "expected sizeof(evtmask), got %u\n", bytes); + ok(ret, "GetOverlappedResult reported error %ld\n", GetLastError()); + ok(bytes == sizeof(evtmask), "expected sizeof(evtmask), got %lu\n", bytes); ok(evtmask & EV_RXCHAR, "EV_RXCHAR should be set\n");
bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadFile(hcom, buf, 0, &bytes, NULL); ok(!ret, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ok(bytes == 0, "bytes %u\n", bytes); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); + ok(bytes == 0, "bytes %lu\n", bytes);
U(iob).Status = -1; iob.Information = -1; status = pNtReadFile(hcom, 0, NULL, NULL, &iob, buf, 0, NULL, NULL); - ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#x\n", status); - ok(U(iob).Status == -1, "expected -1, got %#x\n", U(iob).Status); - ok(iob.Information == -1, "expected -1, got %ld\n", iob.Information); + ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#lx\n", status); + ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status); + ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
for (i = -20; i < 20; i++) { @@ -2162,15 +2163,15 @@ static void test_read_write(void) status = pNtReadFile(hcom, 0, NULL, NULL, &iob, buf, 0, &offset, NULL); if (i >= 0) { - ok(status == STATUS_SUCCESS, "%d: expected STATUS_SUCCESS, got %#x\n", i, status); - ok(U(iob).Status == STATUS_SUCCESS, "%d: expected STATUS_SUCCESS, got %#x\n", i, U(iob).Status); - ok(iob.Information == 0, "%d: expected 0, got %lu\n", i, iob.Information); + ok(status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, status); + ok(U(iob).Status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, U(iob).Status); + ok(iob.Information == 0, "%ld: expected 0, got %Iu\n", i, iob.Information); } else { - ok(status == STATUS_INVALID_PARAMETER, "%d: expected STATUS_INVALID_PARAMETER, got %#x\n", i, status); - ok(U(iob).Status == -1, "%d: expected -1, got %#x\n", i, U(iob).Status); - ok(iob.Information == -1, "%d: expected -1, got %ld\n", i, iob.Information); + ok(status == STATUS_INVALID_PARAMETER, "%ld: expected STATUS_INVALID_PARAMETER, got %#lx\n", i, status); + ok(U(iob).Status == -1, "%ld: expected -1, got %#lx\n", i, U(iob).Status); + ok(iob.Information == -1, "%ld: expected -1, got %Id\n", i, iob.Information); } }
@@ -2178,9 +2179,9 @@ static void test_read_write(void) iob.Information = -1; offset.QuadPart = 0; status = pNtReadFile(hcom, 0, NULL, NULL, &iob, buf, 1, &offset, NULL); - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#x\n", status); - ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#x\n", U(iob).Status); - ok(iob.Information == 1, "expected 1, got %lu\n", iob.Information); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", status); + ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status); + ok(iob.Information == 1, "expected 1, got %Iu\n", iob.Information); goto done; } else
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109576
Your paranoid android.
=== w8 (32 bit report) ===
kernel32: comm.c:1587: Test failed: Unexpected time 797, expected around 500
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/console.c | 881 +++++++++++++++++++++-------------------- 1 file changed, 441 insertions(+), 440 deletions(-)
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index 5f5f0698040..7af273dcfe7 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -18,6 +18,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <ntstatus.h> #define WIN32_NO_STATUS @@ -100,7 +101,7 @@ static HANDLE create_unbound_handle(BOOL output, BOOL test_status) FILE_WRITE_ATTRIBUTES, &attr, &iosb, NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_CREATE, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); - if (test_status) ok(!status, "NtCreateFile failed: %#x\n", status); + if (test_status) ok(!status, "NtCreateFile failed: %#lx\n", status); return status ? NULL : handle; }
@@ -135,7 +136,7 @@ static void testCursor(HANDLE hCon, COORD sbSize)
c.X = c.Y = 0; ok(SetConsoleCursorPosition(0, c) == 0, "No handle\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %u\n", + ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %lu\n", ERROR_INVALID_HANDLE, GetLastError());
c.X = c.Y = 0; @@ -150,25 +151,25 @@ static void testCursor(HANDLE hCon, COORD sbSize) c.X = sbSize.X; c.Y = sbSize.Y - 1; ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu\n", ERROR_INVALID_PARAMETER, GetLastError());
c.X = sbSize.X - 1; c.Y = sbSize.Y; ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu\n", ERROR_INVALID_PARAMETER, GetLastError());
c.X = -1; c.Y = 0; ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu\n", ERROR_INVALID_PARAMETER, GetLastError());
c.X = 0; c.Y = -1; ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu\n", ERROR_INVALID_PARAMETER, GetLastError()); }
@@ -181,7 +182,7 @@ static void testCursorInfo(HANDLE hCon) SetLastError(0xdeadbeef); ret = GetConsoleCursorInfo(NULL, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %u\n", + ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %lu\n", ERROR_INVALID_HANDLE, GetLastError());
SetLastError(0xdeadbeef); @@ -189,7 +190,7 @@ static void testCursorInfo(HANDLE hCon) ret = GetConsoleCursorInfo(NULL, &info); ok(!ret, "Expected failure\n"); ok(info.dwSize == -1, "Expected no change for dwSize\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %u\n", + ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %lu\n", ERROR_INVALID_HANDLE, GetLastError());
/* Test the correct call first to distinguish between win9x and the rest */ @@ -198,9 +199,9 @@ static void testCursorInfo(HANDLE hCon) ok(ret, "Expected success\n"); ok(info.dwSize == 25 || info.dwSize == 12 /* win9x */, - "Expected 12 or 25, got %d\n", info.dwSize); + "Expected 12 or 25, got %ld\n", info.dwSize); ok(info.bVisible, "Expected the cursor to be visible\n"); - ok(GetLastError() == 0xdeadbeef, "GetLastError: expecting %u got %u\n", + ok(GetLastError() == 0xdeadbeef, "GetLastError: expecting %u got %lu\n", 0xdeadbeef, GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0); @@ -208,7 +209,7 @@ static void testCursorInfo(HANDLE hCon) ret = GetConsoleCursorInfo(pipe1, &info); ok(!ret, "Expected failure\n"); ok(info.dwSize == -1, "Expected no change for dwSize\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: %lu\n", GetLastError()); CloseHandle(pipe1); CloseHandle(pipe2);
@@ -265,8 +266,8 @@ static void simple_write_console(HANDLE console, const char *text) ok(SetConsoleCursorPosition(console, c) != 0, "Cursor in upper-left\n");
ret = WriteConsoleA(console, text, strlen(text), &len, NULL); - ok(ret, "WriteConsoleA failed: %u\n", GetLastError()); - ok(len == strlen(text), "unexpected len %u\n", len); + ok(ret, "WriteConsoleA failed: %lu\n", GetLastError()); + ok(len == strlen(text), "unexpected len %lu\n", len); }
static void testWriteSimple(HANDLE hCon) @@ -288,8 +289,8 @@ static void testWriteSimple(HANDLE hCon) okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
ret = WriteFile(hCon, mytest, mylen, &len, NULL); - ok(ret, "WriteFile failed: %u\n", GetLastError()); - ok(len == mylen, "unexpected len = %u\n", len); + ok(ret, "WriteFile failed: %lu\n", GetLastError()); + ok(len == mylen, "unexpected len = %lu\n", len);
for (c.X = 0; c.X < 2 * mylen; c.X++) { @@ -317,7 +318,7 @@ static void testWriteNotWrappedNotProcessed(HANDLE hCon, COORD sbSize) ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3\n");
ret = WriteConsoleA(hCon, mytest, mylen, &len, NULL); - ok(ret != 0 && len == mylen, "Couldn't write, ret = %d, len = %d\n", ret, len); + ok(ret != 0 && len == mylen, "Couldn't write, ret = %d, len = %ld\n", ret, len); c.Y = 0; for (p = mylen - 3; p < mylen; p++) { @@ -668,7 +669,7 @@ static void testScroll(HANDLE hCon, COORD sbSize) { /* Win9x will fail, Only accept ERROR_NOT_ENOUGH_MEMORY */ ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + "Expected ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError()); }
/* clipping, src & dst rect do overlap */ @@ -689,7 +690,7 @@ static void testScroll(HANDLE hCon, COORD sbSize) clip.Bottom = min(H + H / 2, sbSize.Y - 1);
ret = ScrollConsoleScreenBufferA(hCon, &scroll, &clip, dst, &ci); - ok(ret, "ScrollConsoleScreenBufferA failed: %u\n", GetLastError()); + ok(ret, "ScrollConsoleScreenBufferA failed: %lu\n", GetLastError());
for (c.Y = 0; c.Y < sbSize.Y; c.Y++) { @@ -724,7 +725,7 @@ static BOOL WINAPI mch(DWORD event) static void testCtrlHandler(void) { ok(!SetConsoleCtrlHandler(mch, FALSE), "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Bad error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Bad error %lu\n", GetLastError()); ok(SetConsoleCtrlHandler(mch, TRUE), "Couldn't set handler\n"); /* wine requires the event for the test, as we cannot ensure, so far, that * events are processed synchronously in GenerateConsoleCtrlEvent() @@ -748,7 +749,7 @@ static void testCtrlHandler(void) CloseHandle(mch_event); ok(SetConsoleCtrlHandler(mch, FALSE), "Couldn't remove handler\n"); ok(!SetConsoleCtrlHandler(mch, FALSE), "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Bad error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Bad error %lu\n", GetLastError()); }
/* @@ -830,26 +831,26 @@ static void testScreenBuffer(HANDLE hConOut) ok(!SetConsoleActiveScreenBuffer(INVALID_HANDLE_VALUE), "Shouldn't succeed\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", + "GetLastError: expecting %u got %lu\n", ERROR_INVALID_HANDLE, GetLastError());
/* Trying to set non-console handles */ SetLastError(0); ok(!SetConsoleActiveScreenBuffer(hFileOutRW), "Shouldn't succeed\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", + "GetLastError: expecting %u got %lu\n", ERROR_INVALID_HANDLE, GetLastError());
SetLastError(0); ok(!SetConsoleActiveScreenBuffer(hFileOutRO), "Shouldn't succeed\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", + "GetLastError: expecting %u got %lu\n", ERROR_INVALID_HANDLE, GetLastError());
SetLastError(0); ok(!SetConsoleActiveScreenBuffer(hFileOutWT), "Shouldn't succeed\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", + "GetLastError: expecting %u got %lu\n", ERROR_INVALID_HANDLE, GetLastError());
/* trying to write non-console handle */ @@ -858,21 +859,21 @@ static void testScreenBuffer(HANDLE hConOut) error = GetLastError(); ok(!ret, "Shouldn't succeed\n"); ok(error == ERROR_INVALID_HANDLE || error == ERROR_INVALID_FUNCTION, - "GetLastError: got %u\n", error); + "GetLastError: got %lu\n", error);
SetLastError(0xdeadbeef); ret = WriteConsoleA(hFileOutRO, test_str1, lstrlenA(test_str1), &len, NULL); error = GetLastError(); ok(!ret, "Shouldn't succeed\n"); ok(error == ERROR_INVALID_HANDLE || error == ERROR_INVALID_FUNCTION, - "GetLastError: got %u\n", error); + "GetLastError: got %lu\n", error);
SetLastError(0xdeadbeef); ret = WriteConsoleA(hFileOutWT, test_str1, lstrlenA(test_str1), &len, NULL); error = GetLastError(); ok(!ret, "Shouldn't succeed\n"); ok(error == ERROR_INVALID_HANDLE || error == ERROR_INVALID_FUNCTION, - "GetLastError: got %u\n", error); + "GetLastError: got %lu\n", error);
CloseHandle(hFileOutRW); CloseHandle(hFileOutRO); @@ -882,7 +883,7 @@ static void testScreenBuffer(HANDLE hConOut) SetLastError(0); ok(!SetConsoleActiveScreenBuffer(hConOutRO), "Shouldn't succeed\n"); ok(GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == ERROR_ACCESS_DENIED) /* win10 1809 */, - "unexpected last error %u\n", GetLastError()); + "unexpected last error %lu\n", GetLastError());
ok(SetConsoleActiveScreenBuffer(hConOutWT), "Couldn't set new WriteOnly SB\n");
@@ -990,18 +991,18 @@ static void test_new_screen_buffer_properties(HANDLE hConOut) cfi.cbSize = cfi2.cbSize = sizeof(CONSOLE_FONT_INFOEX);
ret = GetCurrentConsoleFontEx(hConOut, FALSE, &cfi); - ok(ret, "GetCurrentConsoleFontEx failed: error %u\n", GetLastError()); + ok(ret, "GetCurrentConsoleFontEx failed: error %lu\n", GetLastError());
hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %lu\n", GetLastError());
ret = GetCurrentConsoleFontEx(hConOut2, FALSE, &cfi2); - ok(ret, "GetCurrentConsoleFontEx failed: error %u\n", GetLastError()); + ok(ret, "GetCurrentConsoleFontEx failed: error %lu\n", GetLastError()); CloseHandle(hConOut2);
ok(cfi2.nFont == cfi.nFont, "Font index should match: " - "got %u, expected %u\n", cfi2.nFont, cfi.nFont); + "got %lu, expected %lu\n", cfi2.nFont, cfi.nFont); ok(cfi2.dwFontSize.X == cfi.dwFontSize.X, "Font width should match: " "got %d, expected %d\n", cfi2.dwFontSize.X, cfi.dwFontSize.X); ok(cfi2.dwFontSize.Y == cfi.dwFontSize.Y, "Font height should match: " @@ -1015,14 +1016,14 @@ static void test_new_screen_buffer_properties(HANDLE hConOut)
/* Display window size */ ret = GetConsoleScreenBufferInfo(hConOut, &csbi); - ok(ret, "GetConsoleScreenBufferInfo failed: error %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfo failed: error %lu\n", GetLastError());
hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %lu\n", GetLastError());
ret = GetConsoleScreenBufferInfo(hConOut2, &csbi2); - ok(ret, "GetConsoleScreenBufferInfo failed: error %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfo failed: error %lu\n", GetLastError()); CloseHandle(hConOut2);
ok(csbi2.srWindow.Left == csbi.srWindow.Left, "Left coordinate should match\n"); @@ -1041,16 +1042,16 @@ static void test_new_screen_buffer_color_attributes(HANDLE hConOut) csbi.cbSize = csbi2.cbSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX);
ret = GetConsoleScreenBufferInfoEx(hConOut, &csbi); - ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfoEx failed: error %lu\n", GetLastError()); orig_attr = csbi.wAttributes; orig_popup = csbi.wPopupAttributes;
hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %lu\n", GetLastError());
ret = GetConsoleScreenBufferInfoEx(hConOut2, &csbi2); - ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfoEx failed: error %lu\n", GetLastError()); CloseHandle(hConOut2);
ok(csbi2.wAttributes == orig_attr, "Character Attributes should have been copied: " @@ -1061,17 +1062,17 @@ static void test_new_screen_buffer_color_attributes(HANDLE hConOut) /* Test different Character Attributes */ attr = FOREGROUND_BLUE|BACKGROUND_GREEN; ret = SetConsoleTextAttribute(hConOut, attr); - ok(ret, "SetConsoleTextAttribute failed: error %u\n", GetLastError()); + ok(ret, "SetConsoleTextAttribute failed: error %lu\n", GetLastError());
hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %lu\n", GetLastError());
memset(&csbi2, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFOEX)); csbi2.cbSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX);
ret = GetConsoleScreenBufferInfoEx(hConOut2, &csbi2); - ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfoEx failed: error %lu\n", GetLastError()); CloseHandle(hConOut2);
ok(csbi2.wAttributes == attr, "Character Attributes should have been copied: " @@ -1080,22 +1081,22 @@ static void test_new_screen_buffer_color_attributes(HANDLE hConOut) ok(csbi2.wPopupAttributes == attr, "Popup Attributes should match Character Attributes\n");
ret = SetConsoleTextAttribute(hConOut, orig_attr); - ok(ret, "SetConsoleTextAttribute failed: error %u\n", GetLastError()); + ok(ret, "SetConsoleTextAttribute failed: error %lu\n", GetLastError());
/* Test inheritance of different Popup Attributes */ csbi.wPopupAttributes = attr; ret = SetConsoleScreenBufferInfoEx(hConOut, &csbi); - ok(ret, "SetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + ok(ret, "SetConsoleScreenBufferInfoEx failed: error %lu\n", GetLastError());
hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %lu\n", GetLastError());
memset(&csbi2, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFOEX)); csbi2.cbSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX);
ret = GetConsoleScreenBufferInfoEx(hConOut2, &csbi2); - ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfoEx failed: error %lu\n", GetLastError()); CloseHandle(hConOut2);
ok(csbi2.wAttributes == orig_attr, "Character Attributes should have been copied: " @@ -1105,7 +1106,7 @@ static void test_new_screen_buffer_color_attributes(HANDLE hConOut)
csbi.wPopupAttributes = orig_popup; ret = SetConsoleScreenBufferInfoEx(hConOut, &csbi); - ok(ret, "SetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + ok(ret, "SetConsoleScreenBufferInfoEx failed: error %lu\n", GetLastError()); }
static void CALLBACK signaled_function(void *p, BOOLEAN timeout) @@ -1146,7 +1147,7 @@ static void testWaitForConsoleInput(HANDLE input_handle) /* If the callback is still running, this fails with ERROR_IO_PENDING, but that's ok and expected. */ ok(ret != 0 || GetLastError() == ERROR_IO_PENDING, - "UnregisterWait failed with error %d\n", GetLastError()); + "UnregisterWait failed with error %ld\n", GetLastError());
/* Test timeout case */ FlushConsoleInputBuffer(input_handle); @@ -1154,7 +1155,7 @@ static void testWaitForConsoleInput(HANDLE input_handle) wait_ret = WaitForSingleObject(complete_event, 100); ok(wait_ret == WAIT_TIMEOUT, "Expected the wait to time out\n"); ret = UnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); + ok(ret, "UnregisterWait failed with error %ld\n", GetLastError());
/* Clean up */ CloseHandle(complete_event); @@ -1179,54 +1180,54 @@ static void test_wait(HANDLE input, HANDLE orig_output) output = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ok(output != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: %u\n", GetLastError()); + ok(output != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: %lu\n", GetLastError());
ret = SetConsoleActiveScreenBuffer(output); - ok(ret, "SetConsoleActiveScreenBuffer failed: %u\n", GetLastError()); + ok(ret, "SetConsoleActiveScreenBuffer failed: %lu\n", GetLastError()); FlushConsoleInputBuffer(input);
unbound_output = create_unbound_handle(TRUE, TRUE); unbound_input = create_unbound_handle(FALSE, TRUE);
res = WaitForSingleObject(input, 0); - ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", res); + ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", res); res = WaitForSingleObject(output, 0); - ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", res); + ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", res); res = WaitForSingleObject(orig_output, 0); - ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", res); + ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", res); res = WaitForSingleObject(unbound_output, 0); - ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", res); + ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", res); res = WaitForSingleObject(unbound_input, 0); - ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", res); + ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", res); status = NtWaitForSingleObject(input, FALSE, &zero); ok(status == STATUS_TIMEOUT || broken(status == STATUS_ACCESS_DENIED /* win2k8 */), - "NtWaitForSingleObject returned %x\n", status); + "NtWaitForSingleObject returned %lx\n", status); status = NtWaitForSingleObject(output, FALSE, &zero); ok(status == STATUS_TIMEOUT || broken(status == STATUS_ACCESS_DENIED /* win2k8 */), - "NtWaitForSingleObject returned %x\n", status); + "NtWaitForSingleObject returned %lx\n", status);
ret = WriteConsoleInputW(input, &ir, 1, &count); - ok(ret, "WriteConsoleInputW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleInputW failed: %lu\n", GetLastError());
res = WaitForSingleObject(input, 0); - ok(!res, "WaitForSingleObject returned %x\n", res); + ok(!res, "WaitForSingleObject returned %lx\n", res); res = WaitForSingleObject(output, 0); - ok(!res, "WaitForSingleObject returned %x\n", res); + ok(!res, "WaitForSingleObject returned %lx\n", res); res = WaitForSingleObject(orig_output, 0); - ok(!res, "WaitForSingleObject returned %x\n", res); + ok(!res, "WaitForSingleObject returned %lx\n", res); res = WaitForSingleObject(unbound_output, 0); - ok(!res, "WaitForSingleObject returned %x\n", res); + ok(!res, "WaitForSingleObject returned %lx\n", res); res = WaitForSingleObject(unbound_input, 0); - ok(!res, "WaitForSingleObject returned %x\n", res); + ok(!res, "WaitForSingleObject returned %lx\n", res); status = NtWaitForSingleObject(input, FALSE, &zero); ok(!status || broken(status == STATUS_ACCESS_DENIED /* win2k8 */), - "NtWaitForSingleObject returned %x\n", status); + "NtWaitForSingleObject returned %lx\n", status); status = NtWaitForSingleObject(output, FALSE, &zero); ok(!status || broken(status == STATUS_ACCESS_DENIED /* win2k8 */), - "NtWaitForSingleObject returned %x\n", status); + "NtWaitForSingleObject returned %lx\n", status);
ret = SetConsoleActiveScreenBuffer(orig_output); - ok(ret, "SetConsoleActiveScreenBuffer failed: %u\n", GetLastError()); + ok(ret, "SetConsoleActiveScreenBuffer failed: %lu\n", GetLastError());
CloseHandle(unbound_input); CloseHandle(unbound_output); @@ -1244,13 +1245,13 @@ static void test_GetSetConsoleInputExeName(void) ret = pGetConsoleInputExeNameA(0, NULL); error = GetLastError(); ok(ret, "GetConsoleInputExeNameA failed\n"); - ok(error == ERROR_BUFFER_OVERFLOW, "got %u expected ERROR_BUFFER_OVERFLOW\n", error); + ok(error == ERROR_BUFFER_OVERFLOW, "got %lu expected ERROR_BUFFER_OVERFLOW\n", error);
SetLastError(0xdeadbeef); ret = pGetConsoleInputExeNameA(0, buffer); error = GetLastError(); ok(ret, "GetConsoleInputExeNameA failed\n"); - ok(error == ERROR_BUFFER_OVERFLOW, "got %u expected ERROR_BUFFER_OVERFLOW\n", error); + ok(error == ERROR_BUFFER_OVERFLOW, "got %lu expected ERROR_BUFFER_OVERFLOW\n", error);
GetModuleFileNameA(GetModuleHandleA(NULL), module, sizeof(module)); p = strrchr(module, '\') + 1; @@ -1263,13 +1264,13 @@ static void test_GetSetConsoleInputExeName(void) ret = pSetConsoleInputExeNameA(NULL); error = GetLastError(); ok(!ret, "SetConsoleInputExeNameA failed\n"); - ok(error == ERROR_INVALID_PARAMETER, "got %u expected ERROR_INVALID_PARAMETER\n", error); + ok(error == ERROR_INVALID_PARAMETER, "got %lu expected ERROR_INVALID_PARAMETER\n", error);
SetLastError(0xdeadbeef); ret = pSetConsoleInputExeNameA(""); error = GetLastError(); ok(!ret, "SetConsoleInputExeNameA failed\n"); - ok(error == ERROR_INVALID_PARAMETER, "got %u expected ERROR_INVALID_PARAMETER\n", error); + ok(error == ERROR_INVALID_PARAMETER, "got %lu expected ERROR_INVALID_PARAMETER\n", error);
ret = pSetConsoleInputExeNameA(input_exe); ok(ret, "SetConsoleInputExeNameA failed\n"); @@ -1293,14 +1294,14 @@ static void test_GetConsoleProcessList(void) ret = pGetConsoleProcessList(NULL, 0); ok(ret == 0, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleProcessList(NULL, 1); ok(ret == 0, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* We should only have 1 process but only for these specific unit tests as @@ -1313,12 +1314,12 @@ static void test_GetConsoleProcessList(void) ret = pGetConsoleProcessList(list, 0); ok(ret == 0, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleProcessList(list, 1); - ok(ret == 1, "Expected 1, got %d\n", ret); + ok(ret == 1, "Expected 1, got %ld\n", ret);
HeapFree(GetProcessHeap(), 0, list);
@@ -1326,12 +1327,12 @@ static void test_GetConsoleProcessList(void)
SetLastError(0xdeadbeef); ret = pGetConsoleProcessList(list, ret); - ok(ret == 1, "Expected 1, got %d\n", ret); + ok(ret == 1, "Expected 1, got %ld\n", ret);
if (ret == 1) { DWORD pid = GetCurrentProcessId(); - ok(list[0] == pid, "Expected %d, got %d\n", pid, list[0]); + ok(list[0] == pid, "Expected %ld, got %ld\n", pid, list[0]); }
HeapFree(GetProcessHeap(), 0, list); @@ -1349,7 +1350,7 @@ static void test_OpenCON(void) { h = CreateFileW(conW, GENERIC_WRITE, 0, NULL, accesses[i], 0, NULL); ok(h != INVALID_HANDLE_VALUE || broken(accesses[i] == TRUNCATE_EXISTING /* Win8 */), - "Expected to open the CON device on write (%x)\n", accesses[i]); + "Expected to open the CON device on write (%lx)\n", accesses[i]); CloseHandle(h);
h = CreateFileW(conW, GENERIC_READ, 0, NULL, accesses[i], 0, NULL); @@ -1359,12 +1360,12 @@ static void test_OpenCON(void) * So don't test when disposition is TRUNCATE_EXISTING */ ok(h != INVALID_HANDLE_VALUE || broken(accesses[i] == TRUNCATE_EXISTING /* Win7+ */), - "Expected to open the CON device on read (%x)\n", accesses[i]); + "Expected to open the CON device on read (%lx)\n", accesses[i]); CloseHandle(h); h = CreateFileW(conW, GENERIC_READ|GENERIC_WRITE, 0, NULL, accesses[i], 0, NULL); - ok(h == INVALID_HANDLE_VALUE, "Expected not to open the CON device on read-write (%x)\n", accesses[i]); + ok(h == INVALID_HANDLE_VALUE, "Expected not to open the CON device on read-write (%lx)\n", accesses[i]); ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, - "Unexpected error %x\n", GetLastError()); + "Unexpected error %lx\n", GetLastError()); } }
@@ -1460,7 +1461,7 @@ static void test_OpenConsoleW(void) "Expected OpenConsoleW to return INVALID_HANDLE_VALUE for index %d, got %p\n", index, ret); ok(gle == invalid_table[index].gle || (gle != 0 && gle == invalid_table[index].gle2), - "Expected GetLastError() to return %u/%u for index %d, got %u\n", + "Expected GetLastError() to return %lu/%lu for index %d, got %lu\n", invalid_table[index].gle, invalid_table[index].gle2, index, gle); }
@@ -1545,7 +1546,7 @@ static void test_CreateFileW(void) ok(cf_table[index].gle, "Expected CreateFileW not to return INVALID_HANDLE_VALUE for index %d\n", index); ok(GetLastError() == cf_table[index].gle, - "Expected GetLastError() to return %u for index %d, got %u\n", + "Expected GetLastError() to return %lu for index %d, got %lu\n", cf_table[index].gle, index, GetLastError()); } else @@ -1568,10 +1569,10 @@ static void test_CreateFileW(void) cf_table[index].creation, FILE_ATTRIBUTE_NORMAL, NULL); if (cf_table[index].gle) ok(ret == INVALID_HANDLE_VALUE && GetLastError() == cf_table[index].gle, - "CreateFileW to returned %p %u for index %d\n", ret, GetLastError(), index); + "CreateFileW to returned %p %lu for index %d\n", ret, GetLastError(), index); else ok(ret != INVALID_HANDLE_VALUE && (!cf_table[index].gle || broken(cf_table[index].is_broken) /* Win7 */), - "CreateFileW to returned %p %u for index %d\n", ret, GetLastError(), index); + "CreateFileW to returned %p %lu for index %d\n", ret, GetLastError(), index); if (ret != INVALID_HANDLE_VALUE) CloseHandle(ret);
if (cf_table[index].gle) continue; @@ -1582,7 +1583,7 @@ static void test_CreateFileW(void) status = NtCreateFile(&ret, cf_table[index].access | SYNCHRONIZE | FILE_READ_ATTRIBUTES, &attr, &iosb, NULL, FILE_ATTRIBUTE_NORMAL, 0, nt_disposition[cf_table[index].creation - CREATE_NEW], FILE_NON_DIRECTORY_FILE, NULL, 0); - ok(!status, "NtCreateFile failed %x for %u\n", status, index); + ok(!status, "NtCreateFile failed %lx for %u\n", status, index); CloseHandle(ret);
RtlInitUnicodeString(&string, cf_table[index].input ? L"\??\CONIN$" : L"\??\CONOUT$"); @@ -1590,7 +1591,7 @@ static void test_CreateFileW(void) status = NtCreateFile(&ret, cf_table[index].access | SYNCHRONIZE | FILE_READ_ATTRIBUTES, &attr, &iosb, NULL, FILE_ATTRIBUTE_NORMAL, 0, nt_disposition[cf_table[index].creation - CREATE_NEW], FILE_NON_DIRECTORY_FILE, NULL, 0); - ok(!status, "NtCreateFile failed %x for %u\n", status, index); + ok(!status, "NtCreateFile failed %lx for %u\n", status, index); CloseHandle(ret); } } @@ -1611,28 +1612,28 @@ static void test_VerifyConsoleIoHandle( HANDLE handle ) ret = pVerifyConsoleIoHandle((HANDLE)0xdeadbee0); error = GetLastError(); ok(!ret, "expected VerifyConsoleIoHandle to fail\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); + ok(error == 0xdeadbeef, "wrong GetLastError() %ld\n", error);
/* invalid handle + 1 */ SetLastError(0xdeadbeef); ret = pVerifyConsoleIoHandle((HANDLE)0xdeadbee1); error = GetLastError(); ok(!ret, "expected VerifyConsoleIoHandle to fail\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); + ok(error == 0xdeadbeef, "wrong GetLastError() %ld\n", error);
/* invalid handle + 2 */ SetLastError(0xdeadbeef); ret = pVerifyConsoleIoHandle((HANDLE)0xdeadbee2); error = GetLastError(); ok(!ret, "expected VerifyConsoleIoHandle to fail\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); + ok(error == 0xdeadbeef, "wrong GetLastError() %ld\n", error);
/* invalid handle + 3 */ SetLastError(0xdeadbeef); ret = pVerifyConsoleIoHandle((HANDLE)0xdeadbee3); error = GetLastError(); ok(!ret, "expected VerifyConsoleIoHandle to fail\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); + ok(error == 0xdeadbeef, "wrong GetLastError() %ld\n", error);
/* valid handle */ SetLastError(0xdeadbeef); @@ -1641,7 +1642,7 @@ static void test_VerifyConsoleIoHandle( HANDLE handle ) ok(ret || broken(!ret), /* Windows 8 and 10 */ "expected VerifyConsoleIoHandle to succeed\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); + ok(error == 0xdeadbeef, "wrong GetLastError() %ld\n", error); }
static void test_GetSetStdHandle(void) @@ -1655,14 +1656,14 @@ static void test_GetSetStdHandle(void) handle = GetStdHandle(42); error = GetLastError(); ok(error == ERROR_INVALID_HANDLE || broken(error == ERROR_INVALID_FUNCTION)/* Win9x */, - "wrong GetLastError() %d\n", error); + "wrong GetLastError() %ld\n", error); ok(handle == INVALID_HANDLE_VALUE, "expected INVALID_HANDLE_VALUE\n");
/* get valid */ SetLastError(0xdeadbeef); handle = GetStdHandle(STD_INPUT_HANDLE); error = GetLastError(); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); + ok(error == 0xdeadbeef, "wrong GetLastError() %ld\n", error);
/* set invalid std handle */ SetLastError(0xdeadbeef); @@ -1670,14 +1671,14 @@ static void test_GetSetStdHandle(void) error = GetLastError(); ok(!ret, "expected SetStdHandle to fail\n"); ok(error == ERROR_INVALID_HANDLE || broken(error == ERROR_INVALID_FUNCTION)/* Win9x */, - "wrong GetLastError() %d\n", error); + "wrong GetLastError() %ld\n", error);
/* set valid (restore old value) */ SetLastError(0xdeadbeef); ret = SetStdHandle(STD_INPUT_HANDLE, handle); error = GetLastError(); ok(ret, "expected SetStdHandle to succeed\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); + ok(error == 0xdeadbeef, "wrong GetLastError() %ld\n", error); }
static void test_DuplicateConsoleHandle(void) @@ -1691,19 +1692,19 @@ static void test_DuplicateConsoleHandle(void)
/* duplicate an event handle with DuplicateConsoleHandle */ handle = DuplicateConsoleHandle(event, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(handle != NULL, "DuplicateConsoleHandle failed: %u\n", GetLastError()); + ok(handle != NULL, "DuplicateConsoleHandle failed: %lu\n", GetLastError());
ret = SetEvent(handle); - ok(ret, "SetEvent failed: %u\n", GetLastError()); + ok(ret, "SetEvent failed: %lu\n", GetLastError());
ret = CloseConsoleHandle(handle); - ok(ret, "CloseConsoleHandle failed: %u\n", GetLastError()); + ok(ret, "CloseConsoleHandle failed: %lu\n", GetLastError()); ret = CloseConsoleHandle(event); - ok(ret, "CloseConsoleHandle failed: %u\n", GetLastError()); + ok(ret, "CloseConsoleHandle failed: %lu\n", GetLastError());
handle = DuplicateConsoleHandle((HANDLE)0xdeadbeef, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(handle == INVALID_HANDLE_VALUE, "DuplicateConsoleHandle failed: %u\n", GetLastError()); - ok(GetLastError() == ERROR_INVALID_HANDLE, "last error = %u\n", GetLastError()); + ok(handle == INVALID_HANDLE_VALUE, "DuplicateConsoleHandle failed: %lu\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "last error = %lu\n", GetLastError()); }
static void test_GetNumberOfConsoleInputEvents(HANDLE input_handle) @@ -1735,10 +1736,10 @@ static void test_GetNumberOfConsoleInputEvents(HANDLE input_handle) if (invalid_table[i].nrofevents) { ok(count == 0xdeadbeef, - "[%d] Expected output count to be unmodified, got %u\n", i, count); + "[%d] Expected output count to be unmodified, got %lu\n", i, count); } ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
@@ -1749,7 +1750,7 @@ static void test_GetNumberOfConsoleInputEvents(HANDLE input_handle) ret = GetNumberOfConsoleInputEvents(input_handle, NULL); ok(!ret, "Expected GetNumberOfConsoleInputEvents to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_ACCESS, - "Expected last error to be ERROR_INVALID_ACCESS, got %u\n", + "Expected last error to be ERROR_INVALID_ACCESS, got %lu\n", GetLastError()); }
@@ -1807,7 +1808,7 @@ static void test_WriteConsoleInputA(HANDLE input_handle) ok(ret == TRUE, "Expected GetConsoleMode to return TRUE, got %d\n", ret); if (!ret) { - skip("GetConsoleMode failed with last error %u\n", GetLastError()); + skip("GetConsoleMode failed with last error %lu\n", GetLastError()); return; }
@@ -1815,7 +1816,7 @@ static void test_WriteConsoleInputA(HANDLE input_handle) ok(ret == TRUE, "Expected SetConsoleMode to return TRUE, got %d\n", ret); if (!ret) { - skip("SetConsoleMode failed with last error %u\n", GetLastError()); + skip("SetConsoleMode failed with last error %lu\n", GetLastError()); return; }
@@ -1840,24 +1841,24 @@ static void test_WriteConsoleInputA(HANDLE input_handle) ok(!ret, "[%d] Expected WriteConsoleInputA to return FALSE, got %d\n", i, ret); gle = GetLastError(); ok(gle == invalid_table[i].gle || (gle != 0 && gle == invalid_table[i].gle2), - "[%d] Expected last error to be %u or %u, got %u\n", + "[%d] Expected last error to be %lu or %lu, got %lu\n", i, invalid_table[i].gle, invalid_table[i].gle2, gle); }
count = 0xdeadbeef; ret = WriteConsoleInputA(input_handle, NULL, 0, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleInputA(input_handle, &event, 0, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = FlushConsoleInputBuffer(input_handle); ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); @@ -1868,20 +1869,20 @@ static void test_WriteConsoleInputA(HANDLE input_handle)
ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); todo_wine - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = FlushConsoleInputBuffer(input_handle); ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); @@ -1896,33 +1897,33 @@ static void test_WriteConsoleInputA(HANDLE input_handle) ret = WriteConsoleInputA(input_handle, event_list, ARRAY_SIZE(event_list), &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); ok(count == ARRAY_SIZE(event_list), - "Expected count to be event list length, got %u\n", count); + "Expected count to be event list length, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); ok(count == ARRAY_SIZE(event_list), - "Expected count to be event list length, got %u\n", count); + "Expected count to be event list length, got %lu\n", count);
ret = WriteConsoleInputA(input_handle, event_list, ARRAY_SIZE(event_list), &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); ok(count == ARRAY_SIZE(event_list), - "Expected count to be event list length, got %u\n", count); + "Expected count to be event list length, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); ok(count == 2*ARRAY_SIZE(event_list), - "Expected count to be twice event list length, got %u\n", count); + "Expected count to be twice event list length, got %lu\n", count);
/* Again, writing a single mouse event with adjacent mouse events queued doesn't appear to affect the count. */ ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); todo_wine ok(count == 2*ARRAY_SIZE(event_list), - "Expected count to be twice event list length, got %u\n", count); + "Expected count to be twice event list length, got %lu\n", count);
ret = FlushConsoleInputBuffer(input_handle); ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); @@ -1940,19 +1941,19 @@ static void test_WriteConsoleInputA(HANDLE input_handle) /* Key events don't exhibit the same behavior as mouse events. */ ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2, "Expected count to be 2, got %u\n", count); + ok(count == 2, "Expected count to be 2, got %lu\n", count);
ret = FlushConsoleInputBuffer(input_handle); ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); @@ -1963,33 +1964,33 @@ static void test_WriteConsoleInputA(HANDLE input_handle)
ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
event.EventType = KEY_EVENT; event.Event.KeyEvent = key_event;
ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2, "Expected count to be 2, got %u\n", count); + ok(count == 2, "Expected count to be 2, got %lu\n", count);
event.EventType = MOUSE_EVENT; event.Event.MouseEvent = mouse_event;
ret = WriteConsoleInputA(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 3, "Expected count to be 3, got %u\n", count); + ok(count == 3, "Expected count to be 3, got %lu\n", count);
/* Restore the old console mode. */ ret = SetConsoleMode(input_handle, console_mode); @@ -2044,7 +2045,7 @@ static void test_WriteConsoleInputW(HANDLE input_handle) ok(ret == TRUE, "Expected GetConsoleMode to return TRUE, got %d\n", ret); if (!ret) { - skip("GetConsoleMode failed with last error %u\n", GetLastError()); + skip("GetConsoleMode failed with last error %lu\n", GetLastError()); return; }
@@ -2052,7 +2053,7 @@ static void test_WriteConsoleInputW(HANDLE input_handle) ok(ret == TRUE, "Expected SetConsoleMode to return TRUE, got %d\n", ret); if (!ret) { - skip("SetConsoleMode failed with last error %u\n", GetLastError()); + skip("SetConsoleMode failed with last error %lu\n", GetLastError()); return; }
@@ -2077,24 +2078,24 @@ static void test_WriteConsoleInputW(HANDLE input_handle) ok(!ret, "[%d] Expected WriteConsoleInputW to return FALSE, got %d\n", i, ret); gle = GetLastError(); ok(gle == invalid_table[i].gle || (gle != 0 && gle == invalid_table[i].gle2), - "[%d] Expected last error to be %u or %u, got %u\n", + "[%d] Expected last error to be %lu or %lu, got %lu\n", i, invalid_table[i].gle, invalid_table[i].gle2, gle); }
count = 0xdeadbeef; ret = WriteConsoleInputW(input_handle, NULL, 0, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleInputW(input_handle, &event, 0, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = FlushConsoleInputBuffer(input_handle); ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); @@ -2105,20 +2106,20 @@ static void test_WriteConsoleInputW(HANDLE input_handle)
ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); todo_wine - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = FlushConsoleInputBuffer(input_handle); ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); @@ -2133,33 +2134,33 @@ static void test_WriteConsoleInputW(HANDLE input_handle) ret = WriteConsoleInputW(input_handle, event_list, ARRAY_SIZE(event_list), &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); ok(count == ARRAY_SIZE(event_list), - "Expected count to be event list length, got %u\n", count); + "Expected count to be event list length, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); ok(count == ARRAY_SIZE(event_list), - "Expected count to be event list length, got %u\n", count); + "Expected count to be event list length, got %lu\n", count);
ret = WriteConsoleInputW(input_handle, event_list, ARRAY_SIZE(event_list), &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); ok(count == ARRAY_SIZE(event_list), - "Expected count to be event list length, got %u\n", count); + "Expected count to be event list length, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); ok(count == 2*ARRAY_SIZE(event_list), - "Expected count to be twice event list length, got %u\n", count); + "Expected count to be twice event list length, got %lu\n", count);
/* Again, writing a single mouse event with adjacent mouse events queued doesn't appear to affect the count. */ ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); todo_wine ok(count == 2*ARRAY_SIZE(event_list), - "Expected count to be twice event list length, got %u\n", count); + "Expected count to be twice event list length, got %lu\n", count);
ret = FlushConsoleInputBuffer(input_handle); ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); @@ -2177,19 +2178,19 @@ static void test_WriteConsoleInputW(HANDLE input_handle) /* Key events don't exhibit the same behavior as mouse events. */ ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2, "Expected count to be 2, got %u\n", count); + ok(count == 2, "Expected count to be 2, got %lu\n", count);
ret = FlushConsoleInputBuffer(input_handle); ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); @@ -2200,33 +2201,33 @@ static void test_WriteConsoleInputW(HANDLE input_handle)
ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
event.EventType = KEY_EVENT; event.Event.KeyEvent = key_event;
ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2, "Expected count to be 2, got %u\n", count); + ok(count == 2, "Expected count to be 2, got %lu\n", count);
event.EventType = MOUSE_EVENT; event.Event.MouseEvent = mouse_event;
ret = WriteConsoleInputW(input_handle, &event, 1, &count); ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
ret = GetNumberOfConsoleInputEvents(input_handle, &count); ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 3, "Expected count to be 3, got %u\n", count); + ok(count == 3, "Expected count to be 3, got %lu\n", count);
/* Restore the old console mode. */ ret = SetConsoleMode(input_handle, console_mode); @@ -2240,11 +2241,11 @@ static void test_FlushConsoleInputBuffer(HANDLE input, HANDLE output) BOOL ret;
ret = FlushConsoleInputBuffer(input); - ok(ret, "FlushConsoleInputBuffer failed: %u\n", GetLastError()); + ok(ret, "FlushConsoleInputBuffer failed: %lu\n", GetLastError());
ret = GetNumberOfConsoleInputEvents(input, &count); - ok(ret, "GetNumberOfConsoleInputEvents failed: %u\n", GetLastError()); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(ret, "GetNumberOfConsoleInputEvents failed: %lu\n", GetLastError()); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
record.EventType = KEY_EVENT; record.Event.KeyEvent.bKeyDown = 1; @@ -2254,39 +2255,39 @@ static void test_FlushConsoleInputBuffer(HANDLE input, HANDLE output) record.Event.KeyEvent.uChar.UnicodeChar = '\r'; record.Event.KeyEvent.dwControlKeyState = 0; ret = WriteConsoleInputW(input, &record, 1, &count); - ok(ret, "WriteConsoleInputW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleInputW failed: %lu\n", GetLastError());
ret = GetNumberOfConsoleInputEvents(input, &count); - ok(ret, "GetNumberOfConsoleInputEvents failed: %u\n", GetLastError()); - ok(count == 1, "Expected count to be 0, got %u\n", count); + ok(ret, "GetNumberOfConsoleInputEvents failed: %lu\n", GetLastError()); + ok(count == 1, "Expected count to be 0, got %lu\n", count);
ret = FlushConsoleInputBuffer(input); - ok(ret, "FlushConsoleInputBuffer failed: %u\n", GetLastError()); + ok(ret, "FlushConsoleInputBuffer failed: %lu\n", GetLastError());
ret = GetNumberOfConsoleInputEvents(input, &count); - ok(ret, "GetNumberOfConsoleInputEvents failed: %u\n", GetLastError()); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(ret, "GetNumberOfConsoleInputEvents failed: %lu\n", GetLastError()); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
ret = WriteConsoleInputW(input, &record, 1, &count); - ok(ret, "WriteConsoleInputW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleInputW failed: %lu\n", GetLastError());
ret = GetNumberOfConsoleInputEvents(input, &count); - ok(ret, "GetNumberOfConsoleInputEvents failed: %u\n", GetLastError()); - ok(count == 1, "Expected count to be 0, got %u\n", count); + ok(ret, "GetNumberOfConsoleInputEvents failed: %lu\n", GetLastError()); + ok(count == 1, "Expected count to be 0, got %lu\n", count);
ret = FlushFileBuffers(input); - ok(ret, "FlushFileBuffers failed: %u\n", GetLastError()); + ok(ret, "FlushFileBuffers failed: %lu\n", GetLastError());
ret = GetNumberOfConsoleInputEvents(input, &count); - ok(ret, "GetNumberOfConsoleInputEvents failed: %u\n", GetLastError()); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(ret, "GetNumberOfConsoleInputEvents failed: %lu\n", GetLastError()); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
ret = FlushConsoleInputBuffer(output); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FlushConsoleInputBuffer returned: %x(%u)\n", + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FlushConsoleInputBuffer returned: %x(%lu)\n", ret, GetLastError());
ret = FlushFileBuffers(output); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FlushFileBuffers returned: %x(%u)\n", + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FlushFileBuffers returned: %x(%lu)\n", ret, GetLastError()); }
@@ -2350,34 +2351,34 @@ static void test_WriteConsoleOutputCharacterA(HANDLE output_handle) if (invalid_table[i].lpNumCharsWritten) { ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", + "[%d] Expected count to be %lu, got %lu\n", i, invalid_table[i].expected_count, count); } ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = WriteConsoleOutputCharacterA(output_handle, NULL, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleOutputCharacterA(output_handle, output, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleOutputCharacterA(output_handle, output, 1, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
count = 0xdeadbeef; origin.X = 200; ret = WriteConsoleOutputCharacterA(output_handle, output, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count); }
static void test_WriteConsoleOutputCharacterW(HANDLE output_handle) @@ -2440,34 +2441,34 @@ static void test_WriteConsoleOutputCharacterW(HANDLE output_handle) if (invalid_table[i].lpNumCharsWritten) { ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", + "[%d] Expected count to be %lu, got %lu\n", i, invalid_table[i].expected_count, count); } ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = WriteConsoleOutputCharacterW(output_handle, NULL, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleOutputCharacterW(output_handle, outputW, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleOutputCharacterW(output_handle, outputW, 1, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
count = 0xdeadbeef; origin.X = 200; ret = WriteConsoleOutputCharacterW(output_handle, outputW, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
}
@@ -2530,34 +2531,34 @@ static void test_WriteConsoleOutputAttribute(HANDLE output_handle) if (invalid_table[i].lpNumAttrsWritten) { ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", + "[%d] Expected count to be %lu, got %lu\n", i, invalid_table[i].expected_count, count); } ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = WriteConsoleOutputAttribute(output_handle, NULL, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleOutputAttribute(output_handle, &attr, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = WriteConsoleOutputAttribute(output_handle, &attr, 1, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
count = 0xdeadbeef; origin.X = 200; ret = WriteConsoleOutputAttribute(output_handle, &attr, 0, origin, &count); ok(ret == TRUE, "Expected WriteConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count); }
static void set_region(SMALL_RECT *region, unsigned int left, unsigned int top, unsigned int right, unsigned int bottom) @@ -2602,7 +2603,7 @@ static void test_WriteConsoleOutput(HANDLE console) }
ret = GetConsoleScreenBufferInfo(console, &info); - ok(ret, "GetConsoleScreenBufferInfo failed: %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfo failed: %lu\n", GetLastError());
size.X = 23; size.Y = 17; @@ -2610,7 +2611,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "WriteConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, 10, 7, 15, 11);
size.X = 23; @@ -2619,7 +2620,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 200, 7, 15, 211); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 200, 7, 15, 211);
size.X = 23; @@ -2628,7 +2629,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 200, 7, 211, 8); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "WriteConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, 200, 7, 211, 8);
size.X = 23; @@ -2637,7 +2638,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 9, 11); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 10, 7, 9, 11);
size.X = 23; @@ -2646,7 +2647,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 11, 6); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 10, 7, 11, 6);
size.X = 2; @@ -2655,7 +2656,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 10, 7, 15, 11);
size.X = 23; @@ -2664,7 +2665,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "WriteConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 10, 7, 15, 11);
size.X = 6; @@ -2673,7 +2674,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "WriteConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, 10, 7, 13, 11);
size.X = 6; @@ -2682,7 +2683,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = WriteConsoleOutputW((HANDLE)0xdeadbeef, char_info_buf, size, coord, ®ion); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "WriteConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "WriteConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); if (!skip_nt) check_region(®ion, 10, 7, 13, 11);
size.X = 16; @@ -2691,7 +2692,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "WriteConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, 10, 7, 15, 10);
size.X = 16; @@ -2700,7 +2701,7 @@ static void test_WriteConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, info.dwSize.X - 2, 7, info.dwSize.X + 2, 7); ret = WriteConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "WriteConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "WriteConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, info.dwSize.X - 2, 7, info.dwSize.X - 1, 7); }
@@ -2748,19 +2749,19 @@ static void test_FillConsoleOutputCharacterA(HANDLE output_handle) invalid_table[i].lpNumCharsWritten); ok(!ret, "[%d] Expected FillConsoleOutputCharacterA to return FALSE, got %d\n", i, ret); ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = FillConsoleOutputCharacterA(output_handle, 'a', 0, origin, &count); ok(ret == TRUE, "Expected FillConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = FillConsoleOutputCharacterA(output_handle, 'a', 1, origin, &count); ok(ret == TRUE, "Expected FillConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count); }
static void test_FillConsoleOutputCharacterW(HANDLE output_handle) @@ -2807,19 +2808,19 @@ static void test_FillConsoleOutputCharacterW(HANDLE output_handle) invalid_table[i].lpNumCharsWritten); ok(!ret, "[%d] Expected FillConsoleOutputCharacterW to return FALSE, got %d\n", i, ret); ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = FillConsoleOutputCharacterW(output_handle, 'a', 0, origin, &count); ok(ret == TRUE, "Expected FillConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = FillConsoleOutputCharacterW(output_handle, 'a', 1, origin, &count); ok(ret == TRUE, "Expected FillConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count); }
static void test_FillConsoleOutputAttribute(HANDLE output_handle) @@ -2866,24 +2867,24 @@ static void test_FillConsoleOutputAttribute(HANDLE output_handle) invalid_table[i].lpNumAttrsWritten); ok(!ret, "[%d] Expected FillConsoleOutputAttribute to return FALSE, got %d\n", i, ret); ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = FillConsoleOutputAttribute(output_handle, FOREGROUND_BLUE, 0, origin, &count); ok(ret == TRUE, "Expected FillConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = FillConsoleOutputAttribute(output_handle, FOREGROUND_BLUE, 1, origin, &count); ok(ret == TRUE, "Expected FillConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
count = 0xdeadbeef; ret = FillConsoleOutputAttribute(output_handle, ~0, 1, origin, &count); ok(ret == TRUE, "Expected FillConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count); }
static void test_ReadConsoleOutputCharacterA(HANDLE output_handle) @@ -2946,34 +2947,34 @@ static void test_ReadConsoleOutputCharacterA(HANDLE output_handle) if (invalid_table[i].read_count) { ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", + "[%d] Expected count to be %lu, got %lu\n", i, invalid_table[i].expected_count, count); } ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = ReadConsoleOutputCharacterA(output_handle, NULL, 0, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = ReadConsoleOutputCharacterA(output_handle, &read, 0, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = ReadConsoleOutputCharacterA(output_handle, &read, 1, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
count = 0xdeadbeef; origin.X = 200; ret = ReadConsoleOutputCharacterA(output_handle, &read, 1, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count); }
static void test_ReadConsoleOutputCharacterW(HANDLE output_handle) @@ -3036,34 +3037,34 @@ static void test_ReadConsoleOutputCharacterW(HANDLE output_handle) if (invalid_table[i].read_count) { ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", + "[%d] Expected count to be %lu, got %lu\n", i, invalid_table[i].expected_count, count); } ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = ReadConsoleOutputCharacterW(output_handle, NULL, 0, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = ReadConsoleOutputCharacterW(output_handle, &read, 0, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = ReadConsoleOutputCharacterW(output_handle, &read, 1, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
count = 0xdeadbeef; origin.X = 200; ret = ReadConsoleOutputCharacterW(output_handle, &read, 1, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count); }
static void test_ReadConsoleOutputAttribute(HANDLE output_handle) @@ -3125,34 +3126,34 @@ static void test_ReadConsoleOutputAttribute(HANDLE output_handle) if (invalid_table[i].read_count) { ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", + "[%d] Expected count to be %lu, got %lu\n", i, invalid_table[i].expected_count, count); } ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", + "[%d] Expected last error to be %lu, got %lu\n", i, invalid_table[i].last_error, GetLastError()); }
count = 0xdeadbeef; ret = ReadConsoleOutputAttribute(output_handle, NULL, 0, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = ReadConsoleOutputAttribute(output_handle, &attr, 0, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); + ok(count == 0, "Expected count to be 0, got %lu\n", count);
count = 0xdeadbeef; ret = ReadConsoleOutputAttribute(output_handle, &attr, 1, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); + ok(count == 1, "Expected count to be 1, got %lu\n", count);
count = 0xdeadbeef; origin.X = 200; ret = ReadConsoleOutputAttribute(output_handle, &attr, 1, origin, &count); ok(ret == TRUE, "Expected ReadConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 1, got %u\n", count); + ok(count == 0, "Expected count to be 1, got %lu\n", count); }
static void test_ReadConsoleOutput(HANDLE console) @@ -3168,7 +3169,7 @@ static void test_ReadConsoleOutput(HANDLE console) if (skip_nt) return;
ret = GetConsoleScreenBufferInfo(console, &info); - ok(ret, "GetConsoleScreenBufferInfo failed: %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfo failed: %lu\n", GetLastError());
size.X = 23; size.Y = 17; @@ -3176,7 +3177,7 @@ static void test_ReadConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "ReadConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "ReadConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, 10, 7, 15, 11);
size.X = 23; @@ -3185,7 +3186,7 @@ static void test_ReadConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 200, 7, 15, 211); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(!ret, "ReadConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + ok(!ret, "ReadConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 200, 7, -15, 0);
size.X = 23; @@ -3195,7 +3196,7 @@ static void test_ReadConsoleOutput(HANDLE console) set_region(®ion, 200, 7, 211, 8); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); ok((!ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_FUNCTION)) || broken(ret /* win8 */), - "ReadConsoleOutputW returned: %x %u\n", ret, GetLastError()); + "ReadConsoleOutputW returned: %x %lu\n", ret, GetLastError()); if (!ret && GetLastError() == ERROR_INVALID_PARAMETER) check_region(®ion, 200, 7, -211, -8);
size.X = 23; @@ -3205,7 +3206,7 @@ static void test_ReadConsoleOutput(HANDLE console) set_region(®ion, 10, 7, 9, 11); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); ok((!ret && (GetLastError() == ERROR_INVALID_FUNCTION || GetLastError() == ERROR_NOT_ENOUGH_MEMORY)) || broken(ret /* win8 */), - "ReadConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + "ReadConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 10, 7, 9, -11);
size.X = 23; @@ -3215,7 +3216,7 @@ static void test_ReadConsoleOutput(HANDLE console) set_region(®ion, 10, 7, 11, 6); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); ok((!ret && (GetLastError() == ERROR_INVALID_FUNCTION || GetLastError() == ERROR_NOT_ENOUGH_MEMORY)) || broken(ret /* win8 */), - "ReadConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + "ReadConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 10, 7, -11, 6);
size.X = 2; @@ -3225,7 +3226,7 @@ static void test_ReadConsoleOutput(HANDLE console) set_region(®ion, 10, 7, 15, 11); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); ok((!ret && (GetLastError() == ERROR_INVALID_FUNCTION || GetLastError() == ERROR_NOT_ENOUGH_MEMORY)) || broken(ret /* win8 */), - "ReadConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + "ReadConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 10, 7, -15, -11);
size.X = 23; @@ -3235,7 +3236,7 @@ static void test_ReadConsoleOutput(HANDLE console) set_region(®ion, 10, 7, 15, 11); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); ok((!ret && (GetLastError() == ERROR_INVALID_FUNCTION || GetLastError() == ERROR_NOT_ENOUGH_MEMORY)) || broken(ret /* win8 */), - "ReadConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + "ReadConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); check_region(®ion, 10, 7, -15, 6);
size.X = 6; @@ -3244,7 +3245,7 @@ static void test_ReadConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "ReadConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "ReadConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, 10, 7, 13, 11);
size.X = 6; @@ -3253,7 +3254,7 @@ static void test_ReadConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = ReadConsoleOutputW((HANDLE)0xdeadbeef, char_info_buf, size, coord, ®ion); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "ReadConsoleOutputW returned: %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "ReadConsoleOutputW returned: %x(%lu)\n", ret, GetLastError()); if (!skip_nt) check_region(®ion, 10, 7, 13, 11);
size.X = 16; @@ -3262,7 +3263,7 @@ static void test_ReadConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, 10, 7, 15, 11); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "ReadConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "ReadConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, 10, 7, 15, 10);
size.X = 16; @@ -3271,14 +3272,14 @@ static void test_ReadConsoleOutput(HANDLE console) coord.Y = 3; set_region(®ion, info.dwSize.X - 2, 7, info.dwSize.X + 2, 7); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret || GetLastError() == ERROR_INVALID_PARAMETER, "ReadConsoleOutputW failed: %u\n", GetLastError()); + ok(ret || GetLastError() == ERROR_INVALID_PARAMETER, "ReadConsoleOutputW failed: %lu\n", GetLastError()); if (ret) check_region(®ion, info.dwSize.X - 2, 7, info.dwSize.X - 1, 7);
coord.X = 2; coord.Y = 3; ret = WriteConsoleOutputCharacterW(console, L"xyz", 3, coord, &count); - ok(ret, "WriteConsoleOutputCharacterW failed: %u\n", GetLastError()); - ok(count == 3, "count = %u\n", count); + ok(ret, "WriteConsoleOutputCharacterW failed: %lu\n", GetLastError()); + ok(count == 3, "count = %lu\n", count);
memset(char_info_buf, 0xc0, sizeof(char_info_buf)); size.X = 16; @@ -3287,7 +3288,7 @@ static void test_ReadConsoleOutput(HANDLE console) coord.Y = 6; set_region(®ion, 2, 3, 5, 3); ret = ReadConsoleOutputW(console, char_info_buf, size, coord, ®ion); - ok(ret, "ReadConsoleOutputW failed: %u\n", GetLastError()); + ok(ret, "ReadConsoleOutputW failed: %lu\n", GetLastError()); check_region(®ion, 2, 3, 5, 3); ch = char_info_buf[coord.Y * size.X + coord.X].Char.UnicodeChar; ok(ch == 'x', "unexpected char %c/%x\n", ch, ch); @@ -3305,52 +3306,52 @@ static void test_ReadConsole(HANDLE input)
SetLastError(0xdeadbeef); ret = GetFileSize(input, NULL); - ok(ret == INVALID_FILE_SIZE, "expected INVALID_FILE_SIZE, got %#x\n", ret); + ok(ret == INVALID_FILE_SIZE, "expected INVALID_FILE_SIZE, got %#lx\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_INVALID_FUNCTION, /* Win 8, 10 */ - "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadFile(input, buf, -128, &bytes, NULL); - ok(!ret, "expected 0, got %u\n", ret); + ok(!ret, "expected 0, got %lu\n", ret); ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || GetLastError() == ERROR_NOACCESS, /* Win 8, 10 */ - "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError()); - ok(!bytes, "expected 0, got %u\n", bytes); + "expected ERROR_NOT_ENOUGH_MEMORY, got %ld\n", GetLastError()); + ok(!bytes, "expected 0, got %lu\n", bytes);
bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadConsoleA(input, buf, -128, &bytes, NULL); - ok(!ret, "expected 0, got %u\n", ret); + ok(!ret, "expected 0, got %lu\n", ret); ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || GetLastError() == ERROR_NOACCESS, /* Win 8, 10 */ - "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError()); - ok(bytes == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", bytes); + "expected ERROR_NOT_ENOUGH_MEMORY, got %ld\n", GetLastError()); + ok(bytes == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", bytes);
bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadConsoleW(input, buf, -128, &bytes, NULL); - ok(!ret, "expected 0, got %u\n", ret); + ok(!ret, "expected 0, got %lu\n", ret); ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || GetLastError() == ERROR_NOACCESS, /* Win 8, 10 */ - "expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError()); - ok(bytes == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", bytes); + "expected ERROR_NOT_ENOUGH_MEMORY, got %ld\n", GetLastError()); + ok(bytes == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", bytes);
output = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); ok(output != INVALID_HANDLE_VALUE, "Could not open console\n");
ret = ReadConsoleW(output, buf, sizeof(buf) / sizeof(WCHAR), &bytes, NULL); ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "ReadConsoleW returned %x(%u)\n", ret, GetLastError()); + "ReadConsoleW returned %lx(%lu)\n", ret, GetLastError());
ret = ReadConsoleA(output, buf, sizeof(buf), &bytes, NULL); ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "ReadConsoleA returned %x(%u)\n", ret, GetLastError()); + "ReadConsoleA returned %lx(%lu)\n", ret, GetLastError());
ret = ReadFile(output, buf, sizeof(buf), &bytes, NULL); ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "ReadFile returned %x(%u)\n", ret, GetLastError()); + "ReadFile returned %lx(%lu)\n", ret, GetLastError());
CloseHandle(output); } @@ -3368,7 +3369,7 @@ static void test_GetCurrentConsoleFont(HANDLE std_output) SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(NULL, FALSE, &cfi); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!cfi.dwFontSize.X, "got %d, expected 0\n", cfi.dwFontSize.X); ok(!cfi.dwFontSize.Y, "got %d, expected 0\n", cfi.dwFontSize.Y);
@@ -3376,7 +3377,7 @@ static void test_GetCurrentConsoleFont(HANDLE std_output) SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(NULL, TRUE, &cfi); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!cfi.dwFontSize.X, "got %d, expected 0\n", cfi.dwFontSize.X); ok(!cfi.dwFontSize.Y, "got %d, expected 0\n", cfi.dwFontSize.Y);
@@ -3384,7 +3385,7 @@ static void test_GetCurrentConsoleFont(HANDLE std_output) SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(GetStdHandle(STD_INPUT_HANDLE), FALSE, &cfi); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!cfi.dwFontSize.X, "got %d, expected 0\n", cfi.dwFontSize.X); ok(!cfi.dwFontSize.Y, "got %d, expected 0\n", cfi.dwFontSize.Y);
@@ -3392,7 +3393,7 @@ static void test_GetCurrentConsoleFont(HANDLE std_output) SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(GetStdHandle(STD_INPUT_HANDLE), TRUE, &cfi); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!cfi.dwFontSize.X, "got %d, expected 0\n", cfi.dwFontSize.X); ok(!cfi.dwFontSize.Y, "got %d, expected 0\n", cfi.dwFontSize.Y);
@@ -3401,7 +3402,7 @@ static void test_GetCurrentConsoleFont(HANDLE std_output) SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(pipe1, TRUE, &cfi); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!cfi.dwFontSize.X, "got %d, expected 0\n", cfi.dwFontSize.X); ok(!cfi.dwFontSize.Y, "got %d, expected 0\n", cfi.dwFontSize.Y); CloseHandle(pipe1); @@ -3411,7 +3412,7 @@ static void test_GetCurrentConsoleFont(HANDLE std_output) SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(std_output, FALSE, &cfi); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError()); GetConsoleScreenBufferInfo(std_output, &csbi); width = csbi.srWindow.Right - csbi.srWindow.Left + 1; height = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; @@ -3425,7 +3426,7 @@ static void test_GetCurrentConsoleFont(HANDLE std_output) SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(std_output, TRUE, &cfi); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError()); ok(cfi.dwFontSize.X == csbi.dwMaximumWindowSize.X, "got %d, expected %d\n", cfi.dwFontSize.X, csbi.dwMaximumWindowSize.X); ok(cfi.dwFontSize.Y == csbi.dwMaximumWindowSize.Y, @@ -3454,82 +3455,82 @@ static void test_GetCurrentConsoleFontEx(HANDLE std_output) SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(NULL, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(NULL, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(std_input, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(std_input, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(std_output, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(std_output, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
cfix.cbSize = sizeof(CONSOLE_FONT_INFOEX);
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(NULL, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(NULL, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(std_input, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(std_input, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0); memset(&cfi, 0, sizeof(CONSOLE_FONT_INFO)); SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(pipe1, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); CloseHandle(pipe1); CloseHandle(pipe2);
SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(std_output, FALSE, &cfix); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
memset(&cfi, 0, sizeof(CONSOLE_FONT_INFO)); SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(std_output, FALSE, &cfi); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
ok(cfix.dwFontSize.X == cfi.dwFontSize.X, "expected values to match\n"); ok(cfix.dwFontSize.Y == cfi.dwFontSize.Y, "expected values to match\n");
SetLastError(0xdeadbeef); c = GetConsoleFontSize(std_output, cfix.nFont); - ok(c.X && c.Y, "GetConsoleFontSize failed; err = %u\n", GetLastError()); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(c.X && c.Y, "GetConsoleFontSize failed; err = %lu\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
ok(cfix.dwFontSize.X == c.X, "Font width doesn't match; got %u, expected %u\n", cfix.dwFontSize.X, c.X); @@ -3544,13 +3545,13 @@ static void test_GetCurrentConsoleFontEx(HANDLE std_output) SetLastError(0xdeadbeef); ret = pGetCurrentConsoleFontEx(std_output, TRUE, &cfix); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
memset(&cfi, 0, sizeof(CONSOLE_FONT_INFO)); SetLastError(0xdeadbeef); ret = GetCurrentConsoleFont(std_output, TRUE, &cfi); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
ok(cfix.dwFontSize.X == cfi.dwFontSize.X, "expected values to match\n"); ok(cfix.dwFontSize.Y == cfi.dwFontSize.Y, "expected values to match\n"); @@ -3574,18 +3575,18 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output) SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(NULL, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(NULL, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0); SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(pipe1, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError()); CloseHandle(pipe1); CloseHandle(pipe2);
@@ -3593,47 +3594,47 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output) SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(pipe1, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError()); CloseHandle(pipe1); CloseHandle(pipe2);
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_input, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_input, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_output, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_output, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
cfix = orig_cfix;
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(NULL, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(NULL, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0); SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(pipe1, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); CloseHandle(pipe1); CloseHandle(pipe2);
@@ -3641,35 +3642,35 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output) SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(pipe1, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); CloseHandle(pipe1); CloseHandle(pipe2);
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_input, FALSE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_input, TRUE, &cfix); ok(!ret, "got %d, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_output, FALSE, &cfix); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_output, TRUE, &cfix); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
/* Restore original console font parameters */ SetLastError(0xdeadbeef); ret = SetCurrentConsoleFontEx(std_output, FALSE, &orig_cfix); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError()); }
static void test_GetConsoleFontSize(HANDLE std_output) @@ -3687,14 +3688,14 @@ static void test_GetConsoleFontSize(HANDLE std_output) memset(&c, 10, sizeof(COORD)); SetLastError(0xdeadbeef); c = GetConsoleFontSize(NULL, index); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!c.X, "got %d, expected 0\n", c.X); ok(!c.Y, "got %d, expected 0\n", c.Y);
memset(&c, 10, sizeof(COORD)); SetLastError(0xdeadbeef); c = GetConsoleFontSize(GetStdHandle(STD_INPUT_HANDLE), index); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!c.X, "got %d, expected 0\n", c.X); ok(!c.Y, "got %d, expected 0\n", c.Y);
@@ -3702,7 +3703,7 @@ static void test_GetConsoleFontSize(HANDLE std_output) memset(&c, 10, sizeof(COORD)); SetLastError(0xdeadbeef); c = GetConsoleFontSize(pipe1, index); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!c.X, "got %d, expected 0\n", c.X); ok(!c.Y, "got %d, expected 0\n", c.Y); CloseHandle(pipe1); @@ -3712,13 +3713,13 @@ static void test_GetConsoleFontSize(HANDLE std_output) memset(&c, 10, sizeof(COORD)); SetLastError(0xdeadbeef); c = GetConsoleFontSize(std_output, cfi.nFont); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError()); GetClientRect(GetConsoleWindow(), &r); GetConsoleScreenBufferInfo(std_output, &csbi); font_width = (r.right - r.left) / (csbi.srWindow.Right - csbi.srWindow.Left + 1); font_height = (r.bottom - r.top) / (csbi.srWindow.Bottom - csbi.srWindow.Top + 1); - ok(c.X == font_width, "got %d, expected %d\n", c.X, font_width); - ok(c.Y == font_height, "got %d, expected %d\n", c.Y, font_height); + ok(c.X == font_width, "got %d, expected %ld\n", c.X, font_width); + ok(c.Y == font_height, "got %d, expected %ld\n", c.Y, font_height);
hmod = GetModuleHandleA("kernel32.dll"); pGetNumberOfConsoleFonts = (void *)GetProcAddress(hmod, "GetNumberOfConsoleFonts"); @@ -3733,7 +3734,7 @@ static void test_GetConsoleFontSize(HANDLE std_output) SetLastError(0xdeadbeef); c = GetConsoleFontSize(std_output, index); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef) /* win10 1809 */, - "unexpected last error %u\n", GetLastError()); + "unexpected last error %lu\n", GetLastError()); if (GetLastError() == ERROR_INVALID_PARAMETER) { ok(!c.X, "got %d, expected 0\n", c.X); @@ -3758,14 +3759,14 @@ static void test_GetLargestConsoleWindowSize(HANDLE std_output) memset(&c, 10, sizeof(COORD)); SetLastError(0xdeadbeef); c = GetLargestConsoleWindowSize(NULL); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!c.X, "got %d, expected 0\n", c.X); ok(!c.Y, "got %d, expected 0\n", c.Y);
memset(&c, 10, sizeof(COORD)); SetLastError(0xdeadbeef); c = GetLargestConsoleWindowSize(GetStdHandle(STD_INPUT_HANDLE)); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!c.X, "got %d, expected 0\n", c.X); ok(!c.Y, "got %d, expected 0\n", c.Y);
@@ -3773,7 +3774,7 @@ static void test_GetLargestConsoleWindowSize(HANDLE std_output) memset(&c, 10, sizeof(COORD)); SetLastError(0xdeadbeef); c = GetLargestConsoleWindowSize(pipe1); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); ok(!c.X, "got %d, expected 0\n", c.X); ok(!c.Y, "got %d, expected 0\n", c.Y); CloseHandle(pipe1); @@ -3806,16 +3807,16 @@ static void test_GetLargestConsoleWindowSize(HANDLE std_output) memset(&c, 10, sizeof(COORD)); SetLastError(0xdeadbeef); c = GetLargestConsoleWindowSize(std_output); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError()); GetCurrentConsoleFont(std_output, FALSE, &cfi); font = GetConsoleFontSize(std_output, cfi.nFont); maxcon_w = workarea_w / font.X; maxcon_h = workarea_h / font.Y; - ok(c.X == maxcon_w || c.X == maxcon_w - 1 /* Win10 */, "got %d, expected %d\n", c.X, maxcon_w); - ok(c.Y == maxcon_h || c.Y == maxcon_h - 1 /* Win10 */, "got %d, expected %d\n", c.Y, maxcon_h); + ok(c.X == maxcon_w || c.X == maxcon_w - 1 /* Win10 */, "got %d, expected %ld\n", c.X, maxcon_w); + ok(c.Y == maxcon_h || c.Y == maxcon_h - 1 /* Win10 */, "got %d, expected %ld\n", c.Y, maxcon_h);
ret = GetConsoleScreenBufferInfo(std_output, &sbi); - ok(ret, "GetConsoleScreenBufferInfo failed %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfo failed %lu\n", GetLastError()); ok(sbi.dwMaximumWindowSize.X == min(c.X, sbi.dwSize.X), "got %d, expected %d\n", sbi.dwMaximumWindowSize.X, min(c.X, sbi.dwSize.X)); ok(sbi.dwMaximumWindowSize.Y == min(c.Y, sbi.dwSize.Y), "got %d, expected %d\n", @@ -3873,17 +3874,17 @@ static void test_GetConsoleFontInfo(HANDLE std_output) HeapFree(GetProcessHeap(), 0, cfi); return; } - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleFontInfo(GetStdHandle(STD_INPUT_HANDLE), FALSE, 0, cfi); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleFontInfo(std_output, FALSE, 0, cfi); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
GetConsoleScreenBufferInfo(std_output, &csbi); win_width = csbi.srWindow.Right - csbi.srWindow.Left + 1; @@ -3903,7 +3904,7 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
for (i = 0; i < num_fonts; i++) { - ok(cfi[i].nFont == i, "element out of order, got nFont %d, expected %d\n", cfi[i].nFont, i); + ok(cfi[i].nFont == i, "element out of order, got nFont %ld, expected %ld\n", cfi[i].nFont, i); tmp_font = GetConsoleFontSize(std_output, cfi[i].nFont); tmp_w = (double)orig_font.X / tmp_font.X * win_width; tmp_h = (double)orig_font.Y / tmp_font.Y * win_height; @@ -3914,17 +3915,17 @@ static void test_GetConsoleFontInfo(HANDLE std_output) SetLastError(0xdeadbeef); ret = pGetConsoleFontInfo(NULL, TRUE, 0, cfi); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleFontInfo(GetStdHandle(STD_INPUT_HANDLE), TRUE, 0, cfi); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleFontInfo(std_output, TRUE, 0, cfi); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
memset(cfi, 0, memsize); ret = pGetConsoleFontInfo(std_output, TRUE, num_fonts, cfi); @@ -3936,7 +3937,7 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
for (i = 0; i < num_fonts; i++) { - ok(cfi[i].nFont == i, "element out of order, got nFont %d, expected %d\n", cfi[i].nFont, i); + ok(cfi[i].nFont == i, "element out of order, got nFont %ld, expected %ld\n", cfi[i].nFont, i); tmp_font = GetConsoleFontSize(std_output, cfi[i].nFont); tmp_w = (double)orig_font.X / tmp_font.X * csbi.dwMaximumWindowSize.X; tmp_h = (double)orig_font.Y / tmp_font.Y * csbi.dwMaximumWindowSize.Y; @@ -3973,12 +3974,12 @@ static void test_SetConsoleFont(HANDLE std_output) skip("SetConsoleFont is not implemented\n"); return; } - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pSetConsoleFont(GetStdHandle(STD_INPUT_HANDLE), 0); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
pGetNumberOfConsoleFonts = (void *)GetProcAddress(hmod, "GetNumberOfConsoleFonts"); if (!pGetNumberOfConsoleFonts) @@ -3992,7 +3993,7 @@ static void test_SetConsoleFont(HANDLE std_output) SetLastError(0xdeadbeef); ret = pSetConsoleFont(std_output, num_fonts); ok(!ret, "got %d, expected zero\n", ret); - todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError()); }
static void test_GetConsoleScreenBufferInfoEx(HANDLE std_output) @@ -4015,42 +4016,42 @@ static void test_GetConsoleScreenBufferInfoEx(HANDLE std_output) SetLastError(0xdeadbeef); ret = pGetConsoleScreenBufferInfoEx(NULL, &csbix); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleScreenBufferInfoEx(std_input, &csbix); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleScreenBufferInfoEx(std_output, &csbix); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
csbix.cbSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX);
SetLastError(0xdeadbeef); ret = pGetConsoleScreenBufferInfoEx(NULL, &csbix); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetConsoleScreenBufferInfoEx(std_input, &csbix); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0); SetLastError(0xdeadbeef); ret = pGetConsoleScreenBufferInfoEx(std_input, &csbix); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError()); CloseHandle(pipe1); CloseHandle(pipe2);
SetLastError(0xdeadbeef); ret = pGetConsoleScreenBufferInfoEx(std_output, &csbix); ok(ret, "got %d, expected non-zero\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError()); }
static void test_FreeConsole(void) @@ -4066,7 +4067,7 @@ static void test_FreeConsole(void) ok(RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle != NULL, "ConsoleHandle is NULL\n"); ok(!SetConsoleCtrlHandler(mydummych, FALSE), "dummy ctrl handler shouldn't be set\n"); ret = SetConsoleCtrlHandler(mydummych, TRUE); - ok(ret, "SetConsoleCtrlHandler failed: %u\n", GetLastError()); + ok(ret, "SetConsoleCtrlHandler failed: %lu\n", GetLastError()); if (!skip_nt) { unbound_input = create_unbound_handle(FALSE, TRUE); @@ -4074,7 +4075,7 @@ static void test_FreeConsole(void) }
ret = FreeConsole(); - ok(ret, "FreeConsole failed: %u\n", GetLastError()); + ok(ret, "FreeConsole failed: %lu\n", GetLastError());
ok(RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle == NULL, "ConsoleHandle = %p\n", RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle); @@ -4082,67 +4083,67 @@ static void test_FreeConsole(void) handle = CreateFileA("CONOUT$", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); ok(handle == INVALID_HANDLE_VALUE && (GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == ERROR_ACCESS_DENIED /* winxp */)), - "CreateFileA failed: %u\n", GetLastError()); + "CreateFileA failed: %lu\n", GetLastError());
handle = CreateFileA("CONIN$", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); ok(handle == INVALID_HANDLE_VALUE && (GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == ERROR_ACCESS_DENIED /* winxp */)), - "CreateFileA failed: %u\n", GetLastError()); + "CreateFileA failed: %lu\n", GetLastError());
handle = CreateFileA("CON", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); ok(handle == INVALID_HANDLE_VALUE && (GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == ERROR_ACCESS_DENIED /* winxp */)), - "CreateFileA failed: %u\n", GetLastError()); + "CreateFileA failed: %lu\n", GetLastError());
handle = CreateFileA("CON", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); ok(handle == INVALID_HANDLE_VALUE && (GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == ERROR_FILE_NOT_FOUND /* winxp */)), - "CreateFileA failed: %u\n", GetLastError()); + "CreateFileA failed: %lu\n", GetLastError());
handle = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); ok(handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_INVALID_HANDLE, - "CreateConsoleScreenBuffer returned: %p (%u)\n", handle, GetLastError()); + "CreateConsoleScreenBuffer returned: %p (%lu)\n", handle, GetLastError());
SetLastError(0xdeadbeef); cp = GetConsoleCP(); ok(!cp, "cp = %x\n", cp); - ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %lu\n", GetLastError());
SetLastError(0xdeadbeef); cp = GetConsoleOutputCP(); ok(!cp, "cp = %x\n", cp); - ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetConsoleCP(GetOEMCP()); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "SetConsoleCP returned %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "SetConsoleCP returned %x(%lu)\n", ret, GetLastError());
SetLastError(0xdeadbeef); ret = SetConsoleOutputCP(GetOEMCP()); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "SetConsoleCP returned %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "SetConsoleCP returned %x(%lu)\n", ret, GetLastError());
if (skip_nt) return;
SetLastError(0xdeadbeef); memset( title, 0xc0, sizeof(title) ); size = GetConsoleTitleW( title, ARRAY_SIZE(title) ); - ok(!size, "GetConsoleTitleW returned %u\n", size); + ok(!size, "GetConsoleTitleW returned %lu\n", size); ok(title[0] == 0xc0c0, "title byffer changed\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetConsoleTitleW( L"test" ); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "SetConsoleTitleW returned %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "SetConsoleTitleW returned %x(%lu)\n", ret, GetLastError());
SetLastError(0xdeadbeef); hwnd = GetConsoleWindow(); ok(!hwnd, "hwnd = %p\n", hwnd); - ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %lu\n", GetLastError());
ret = GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "GenerateConsoleCtrlEvent returned %x(%u)\n", + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "GenerateConsoleCtrlEvent returned %x(%lu)\n", ret, GetLastError());
SetStdHandle( STD_INPUT_HANDLE, (HANDLE)0xdeadbeef ); @@ -4154,27 +4155,27 @@ static void test_FreeConsole(void)
ret = ReadFile(unbound_input, buf, sizeof(buf), &size, NULL); ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "ReadFile returned %x %u\n", ret, GetLastError()); + "ReadFile returned %x %lu\n", ret, GetLastError());
ret = FlushFileBuffers(unbound_input); ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "ReadFile returned %x %u\n", ret, GetLastError()); + "ReadFile returned %x %lu\n", ret, GetLastError());
ret = WriteFile(unbound_input, "test", 4, &size, NULL); ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "ReadFile returned %x %u\n", ret, GetLastError()); + "ReadFile returned %x %lu\n", ret, GetLastError());
ret = GetConsoleMode(unbound_input, &mode); ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "GetConsoleMode returned %x %u\n", ret, GetLastError()); + "GetConsoleMode returned %x %lu\n", ret, GetLastError()); ret = GetConsoleMode(unbound_output, &mode); ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "GetConsoleMode returned %x %u\n", ret, GetLastError()); + "GetConsoleMode returned %x %lu\n", ret, GetLastError());
type = GetFileType(unbound_input); - ok(type == FILE_TYPE_CHAR, "GetFileType returned %u\n", type); + ok(type == FILE_TYPE_CHAR, "GetFileType returned %lu\n", type); type = GetFileType(unbound_output); - ok(type == FILE_TYPE_CHAR, "GetFileType returned %u\n", type); + ok(type == FILE_TYPE_CHAR, "GetFileType returned %lu\n", type);
todo_wine ok(!SetConsoleCtrlHandler(mydummych, FALSE), "FreeConsole() should have reset ctrl handlers' list\n"); @@ -4208,24 +4209,24 @@ static void test_SetConsoleScreenBufferInfoEx(HANDLE std_output) SetLastError(0xdeadbeef); ret = pSetConsoleScreenBufferInfoEx(NULL, &info); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %lu, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); ret = pSetConsoleScreenBufferInfoEx(std_output, &info); ok(ret, "got %d, expected one\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %lu, expected 0xdeadbeef\n", GetLastError());
SetLastError(0xdeadbeef); ret = pSetConsoleScreenBufferInfoEx(std_input, &info); ok(!ret, "got %d, expected zero\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_ACCESS_DENIED, - "got %u, expected 5 or 6\n", GetLastError()); + "got %lu, expected 5 or 6\n", GetLastError());
info.cbSize = 0; SetLastError(0xdeadbeef); ret = pSetConsoleScreenBufferInfoEx(std_output, &info); ok(!ret, "got %d, expected zero\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu, expected 87\n", GetLastError());
CloseHandle(std_input); } @@ -4236,20 +4237,20 @@ static void test_console_title(void) BOOL ret;
ret = SetConsoleTitleW(L"test"); - ok(ret, "SetConsoleTitleW failed: %u\n", GetLastError()); + ok(ret, "SetConsoleTitleW failed: %lu\n", GetLastError());
ret = GetConsoleTitleW(buf, ARRAY_SIZE(buf)); - ok(ret, "GetConsoleTitleW failed: %u\n", GetLastError()); + ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); ok(!wcscmp(buf, L"test"), "title = %s\n", wine_dbgstr_w(buf));
if (!skip_nt) { ret = GetConsoleTitleW(buf, 2); - ok(ret, "GetConsoleTitleW failed: %u\n", GetLastError()); + ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); ok(!wcscmp(buf, L"t"), "title = %s\n", wine_dbgstr_w(buf));
ret = GetConsoleTitleW(buf, 4); - ok(ret, "GetConsoleTitleW failed: %u\n", GetLastError()); + ok(ret, "GetConsoleTitleW failed: %lu\n", GetLastError()); ok(!wcscmp(buf, L"tes"), "title = %s\n", wine_dbgstr_w(buf)); } } @@ -4267,35 +4268,35 @@ static void test_file_info(HANDLE input, HANDLE output) if (skip_nt) return;
status = NtQueryInformationFile(input, &io, &std_info, sizeof(std_info), FileStandardInformation); - ok(status == STATUS_INVALID_DEVICE_REQUEST, "NtQueryInformationFile returned: %#x\n", status); + ok(status == STATUS_INVALID_DEVICE_REQUEST, "NtQueryInformationFile returned: %#lx\n", status);
status = NtQueryInformationFile(output, &io, &std_info, sizeof(std_info), FileStandardInformation); - ok(status == STATUS_INVALID_DEVICE_REQUEST, "NtQueryInformationFile returned: %#x\n", status); + ok(status == STATUS_INVALID_DEVICE_REQUEST, "NtQueryInformationFile returned: %#lx\n", status);
ret = GetFileSizeEx(input, &size); ok(!ret && GetLastError() == ERROR_INVALID_FUNCTION, - "GetFileSizeEx returned %x(%u)\n", ret, GetLastError()); + "GetFileSizeEx returned %x(%lu)\n", ret, GetLastError());
ret = GetFileSizeEx(output, &size); ok(!ret && GetLastError() == ERROR_INVALID_FUNCTION, - "GetFileSizeEx returned %x(%u)\n", ret, GetLastError()); + "GetFileSizeEx returned %x(%lu)\n", ret, GetLastError());
status = NtQueryVolumeInformationFile(input, &io, &fs_info, sizeof(fs_info), FileFsDeviceInformation); - ok(!status, "NtQueryVolumeInformationFile failed: %#x\n", status); - ok(fs_info.DeviceType == FILE_DEVICE_CONSOLE, "DeviceType = %u\n", fs_info.DeviceType); + ok(!status, "NtQueryVolumeInformationFile failed: %#lx\n", status); + ok(fs_info.DeviceType == FILE_DEVICE_CONSOLE, "DeviceType = %lu\n", fs_info.DeviceType); ok(fs_info.Characteristics == FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL, - "Characteristics = %x\n", fs_info.Characteristics); + "Characteristics = %lx\n", fs_info.Characteristics);
status = NtQueryVolumeInformationFile(output, &io, &fs_info, sizeof(fs_info), FileFsDeviceInformation); - ok(!status, "NtQueryVolumeInformationFile failed: %#x\n", status); - ok(fs_info.DeviceType == FILE_DEVICE_CONSOLE, "DeviceType = %u\n", fs_info.DeviceType); + ok(!status, "NtQueryVolumeInformationFile failed: %#lx\n", status); + ok(fs_info.DeviceType == FILE_DEVICE_CONSOLE, "DeviceType = %lu\n", fs_info.DeviceType); ok(fs_info.Characteristics == FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL, - "Characteristics = %x\n", fs_info.Characteristics); + "Characteristics = %lx\n", fs_info.Characteristics);
type = GetFileType(input); - ok(type == FILE_TYPE_CHAR, "GetFileType returned %u\n", type); + ok(type == FILE_TYPE_CHAR, "GetFileType returned %lu\n", type); type = GetFileType(output); - ok(type == FILE_TYPE_CHAR, "GetFileType returned %u\n", type); + ok(type == FILE_TYPE_CHAR, "GetFileType returned %lu\n", type); }
static void test_AttachConsole_child(DWORD console_pid) @@ -4308,15 +4309,15 @@ static void test_AttachConsole_child(DWORD console_pid) BOOL res;
res = CreatePipe(&pipe_in, &pipe_out, NULL, 0); - ok(res, "CreatePipe failed: %u\n", GetLastError()); + ok(res, "CreatePipe failed: %lu\n", GetLastError());
res = AttachConsole(console_pid); ok(!res && GetLastError() == ERROR_ACCESS_DENIED, - "AttachConsole returned: %x(%u)\n", res, GetLastError()); + "AttachConsole returned: %x(%lu)\n", res, GetLastError());
ok(RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle != NULL, "ConsoleHandle is NULL\n"); res = FreeConsole(); - ok(res, "FreeConsole failed: %u\n", GetLastError()); + ok(res, "FreeConsole failed: %lu\n", GetLastError()); ok(RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle == NULL, "ConsoleHandle = %p\n", RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle);
@@ -4324,10 +4325,10 @@ static void test_AttachConsole_child(DWORD console_pid)
ok(!SetConsoleCtrlHandler(mydummych, FALSE), "dummy ctrl handler shouldn't be set\n"); res = SetConsoleCtrlHandler(mydummych, TRUE); - ok(res, "SetConsoleCtrlHandler failed: %u\n", GetLastError()); + ok(res, "SetConsoleCtrlHandler failed: %lu\n", GetLastError());
res = AttachConsole(console_pid); - ok(res, "AttachConsole failed: %u\n", GetLastError()); + ok(res, "AttachConsole failed: %lu\n", GetLastError());
ok(pipe_out != GetStdHandle(STD_ERROR_HANDLE), "std handle not set to console\n"); ok(RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle != NULL, "ConsoleHandle is NULL\n"); @@ -4336,21 +4337,21 @@ static void test_AttachConsole_child(DWORD console_pid) ok(console != INVALID_HANDLE_VALUE, "Could not open console\n");
res = ReadConsoleOutputCharacterA(console, buf, 6, c, &len); - ok(res, "ReadConsoleOutputCharacterA failed: %u\n", GetLastError()); - ok(len == 6, "len = %u\n", len); + ok(res, "ReadConsoleOutputCharacterA failed: %lu\n", GetLastError()); + ok(len == 6, "len = %lu\n", len); ok(!memcmp(buf, "Parent", 6), "Unexpected console output\n");
todo_wine ok(!SetConsoleCtrlHandler(mydummych, FALSE), "AttachConsole() should have reset ctrl handlers' list\n");
res = FreeConsole(); - ok(res, "FreeConsole failed: %u\n", GetLastError()); + ok(res, "FreeConsole failed: %lu\n", GetLastError());
SetStdHandle(STD_INPUT_HANDLE, pipe_in); SetStdHandle(STD_OUTPUT_HANDLE, pipe_out);
res = AttachConsole(ATTACH_PARENT_PROCESS); - ok(res, "AttachConsole failed: %u\n", GetLastError()); + ok(res, "AttachConsole failed: %lu\n", GetLastError());
if (pGetConsoleProcessList) { @@ -4359,14 +4360,14 @@ static void test_AttachConsole_child(DWORD console_pid)
SetLastError(0xdeadbeef); len = pGetConsoleProcessList(list, 1); - ok(len == 2, "Expected 2 processes, got %d\n", len); - ok(list[0] == 0xbabebabe, "Unexpected value in list %u\n", list[0]); + ok(len == 2, "Expected 2 processes, got %ld\n", len); + ok(list[0] == 0xbabebabe, "Unexpected value in list %lu\n", list[0]);
len = pGetConsoleProcessList(list, 2); - ok(len == 2, "Expected 2 processes, got %d\n", len); + ok(len == 2, "Expected 2 processes, got %ld\n", len); ok(list[0] == console_pid || list[1] == console_pid, "Parent PID not in list\n"); ok(list[0] == pid || list[1] == pid, "PID not in list\n"); - ok(GetLastError() == 0xdeadbeef, "Unexpected last error: %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Unexpected last error: %lu\n", GetLastError()); }
ok(pipe_in != GetStdHandle(STD_INPUT_HANDLE), "std handle not set to console\n"); @@ -4376,15 +4377,15 @@ static void test_AttachConsole_child(DWORD console_pid) ok(console != INVALID_HANDLE_VALUE, "Could not open console\n");
res = ReadConsoleOutputCharacterA(console, buf, 6, c, &len); - ok(res, "ReadConsoleOutputCharacterA failed: %u\n", GetLastError()); - ok(len == 6, "len = %u\n", len); + ok(res, "ReadConsoleOutputCharacterA failed: %lu\n", GetLastError()); + ok(len == 6, "len = %lu\n", len); ok(!memcmp(buf, "Parent", 6), "Unexpected console output\n");
simple_write_console(console, "Child"); CloseHandle(console);
res = FreeConsole(); - ok(res, "FreeConsole failed: %u\n", GetLastError()); + ok(res, "FreeConsole failed: %lu\n", GetLastError());
res = CloseHandle(pipe_in); ok(res, "pipe_in is no longer valid\n"); @@ -4404,17 +4405,17 @@ static void test_AttachConsole(HANDLE console) simple_write_console(console, "Parent console");
winetest_get_mainargs(&argv); - sprintf(buf, ""%s" console attach_console %x", argv[0], GetCurrentProcessId()); + sprintf(buf, ""%s" console attach_console %lx", argv[0], GetCurrentProcessId()); res = CreateProcessA(NULL, buf, NULL, NULL, TRUE, 0, NULL, NULL, &si, &info); - ok(res, "CreateProcess failed: %u\n", GetLastError()); + ok(res, "CreateProcess failed: %lu\n", GetLastError()); CloseHandle(info.hThread);
wait_child_process(info.hProcess); CloseHandle(info.hProcess);
res = ReadConsoleOutputCharacterA(console, buf, 5, c, &len); - ok(res, "ReadConsoleOutputCharacterA failed: %u\n", GetLastError()); - ok(len == 5, "len = %u\n", len); + ok(res, "ReadConsoleOutputCharacterA failed: %lu\n", GetLastError()); + ok(len == 5, "len = %lu\n", len); ok(!memcmp(buf, "Child", 5), "Unexpected console output\n"); }
@@ -4431,16 +4432,16 @@ static void test_AllocConsole_child(void) prev_output = GetStdHandle(STD_OUTPUT_HANDLE); res = DuplicateHandle(GetCurrentProcess(), prev_output, GetCurrentProcess(), &unbound_output, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(res, "DuplicateHandle failed: %u\n", GetLastError()); + ok(res, "DuplicateHandle failed: %lu\n", GetLastError());
res = GetConsoleMode(unbound_output, &mode); - ok(res, "GetConsoleMode failed: %u\n", GetLastError()); + ok(res, "GetConsoleMode failed: %lu\n", GetLastError());
prev_error = GetStdHandle(STD_ERROR_HANDLE); if (si.dwFlags & STARTF_USESTDHANDLES) { res = GetConsoleMode(prev_error, &mode); - ok(!res && GetLastError() == ERROR_INVALID_HANDLE, "GetConsoleMode failed: %u\n", GetLastError()); + ok(!res && GetLastError() == ERROR_INVALID_HANDLE, "GetConsoleMode failed: %lu\n", GetLastError()); }
FreeConsole(); @@ -4448,13 +4449,13 @@ static void test_AllocConsole_child(void) ok(GetStdHandle(STD_OUTPUT_HANDLE) == prev_output, "GetStdHandle(STD_OUTPUT_HANDLE) = %p\n", GetStdHandle(STD_OUTPUT_HANDLE)); ok(GetStdHandle(STD_ERROR_HANDLE) == prev_error, "GetStdHandle(STD_ERROR_HANDLE) = %p\n", GetStdHandle(STD_ERROR_HANDLE)); res = GetConsoleMode(unbound_output, &mode); - ok(!res && GetLastError() == ERROR_INVALID_HANDLE, "GetConsoleMode failed: %u\n", GetLastError()); + ok(!res && GetLastError() == ERROR_INVALID_HANDLE, "GetConsoleMode failed: %lu\n", GetLastError());
ok(!SetConsoleCtrlHandler(mydummych, FALSE), "dummy ctrl handler shouldn't be set\n"); res = SetConsoleCtrlHandler(mydummych, TRUE); - ok(res, "SetConsoleCtrlHandler failed: %u\n", GetLastError()); + ok(res, "SetConsoleCtrlHandler failed: %lu\n", GetLastError()); res = AllocConsole(); - ok(res, "AllocConsole failed: %u\n", GetLastError()); + ok(res, "AllocConsole failed: %lu\n", GetLastError());
if (si.dwFlags & STARTF_USESTDHANDLES) { @@ -4463,7 +4464,7 @@ static void test_AllocConsole_child(void) }
res = GetConsoleMode(unbound_output, &mode); - ok(res, "GetConsoleMode failed: %u\n", GetLastError()); + ok(res, "GetConsoleMode failed: %lu\n", GetLastError());
todo_wine ok(!SetConsoleCtrlHandler(mydummych, FALSE), "AllocConsole() should have reset ctrl handlers' list\n"); @@ -4472,20 +4473,20 @@ static void test_AllocConsole_child(void) SetStdHandle(STD_OUTPUT_HANDLE, NULL); SetStdHandle(STD_ERROR_HANDLE, NULL); res = AllocConsole(); - ok(res, "AllocConsole failed: %u\n", GetLastError()); + ok(res, "AllocConsole failed: %lu\n", GetLastError());
ok(GetStdHandle(STD_OUTPUT_HANDLE) != NULL, "GetStdHandle(STD_OUTPUT_HANDLE) = %p\n", GetStdHandle(STD_OUTPUT_HANDLE)); ok(GetStdHandle(STD_ERROR_HANDLE) != NULL, "GetStdHandle(STD_ERROR_HANDLE) = %p\n", GetStdHandle(STD_ERROR_HANDLE));
res = GetConsoleMode(unbound_output, &mode); - ok(res, "GetConsoleMode failed: %u\n", GetLastError()); + ok(res, "GetConsoleMode failed: %lu\n", GetLastError()); res = GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode); - ok(res, "GetConsoleMode failed: %u\n", GetLastError()); + ok(res, "GetConsoleMode failed: %lu\n", GetLastError()); res = GetConsoleMode(GetStdHandle(STD_ERROR_HANDLE), &mode); - ok(res, "GetConsoleMode failed: %u\n", GetLastError()); + ok(res, "GetConsoleMode failed: %lu\n", GetLastError());
res = CloseHandle(unbound_output); - ok(res, "CloseHandle failed: %u\n", GetLastError()); + ok(res, "CloseHandle failed: %lu\n", GetLastError()); }
static void test_AllocConsole(void) @@ -4502,18 +4503,18 @@ static void test_AllocConsole(void) winetest_get_mainargs(&argv); sprintf(buf, ""%s" console alloc_console", argv[0]); res = CreateProcessA(NULL, buf, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &info); - ok(res, "CreateProcess failed: %u\n", GetLastError()); + ok(res, "CreateProcess failed: %lu\n", GetLastError()); CloseHandle(info.hThread); wait_child_process(info.hProcess); CloseHandle(info.hProcess);
res = CreatePipe(&pipe_read, &pipe_write, &inheritable_attr, 0); - ok(res, "CreatePipe failed: %u\n", GetLastError()); + ok(res, "CreatePipe failed: %lu\n", GetLastError());
si.dwFlags = STARTF_USESTDHANDLES; si.hStdError = pipe_write; res = CreateProcessA(NULL, buf, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &info); - ok(res, "CreateProcess failed: %u\n", GetLastError()); + ok(res, "CreateProcess failed: %lu\n", GetLastError()); CloseHandle(info.hThread); wait_child_process(info.hProcess); CloseHandle(info.hProcess); @@ -4531,39 +4532,39 @@ static void test_pseudo_console_child(HANDLE input, HANDLE output) BOOL ret;
ret = GetConsoleMode(input, &mode); - ok(ret, "GetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "GetConsoleMode failed: %lu\n", GetLastError()); ok(mode == (ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_MOUSE_INPUT | ENABLE_INSERT_MODE | ENABLE_QUICK_EDIT_MODE | ENABLE_EXTENDED_FLAGS | ENABLE_AUTO_POSITION), - "mode = %x\n", mode); + "mode = %lx\n", mode);
ret = SetConsoleMode(input, mode & ~ENABLE_AUTO_POSITION); - ok(ret, "SetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "SetConsoleMode failed: %lu\n", GetLastError());
ret = GetConsoleMode(input, &mode); - ok(ret, "GetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "GetConsoleMode failed: %lu\n", GetLastError()); ok(mode == (ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_MOUSE_INPUT | - ENABLE_INSERT_MODE | ENABLE_QUICK_EDIT_MODE | ENABLE_EXTENDED_FLAGS), "mode = %x\n", mode); + ENABLE_INSERT_MODE | ENABLE_QUICK_EDIT_MODE | ENABLE_EXTENDED_FLAGS), "mode = %lx\n", mode);
ret = SetConsoleMode(input, mode | ENABLE_AUTO_POSITION); - ok(ret, "SetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "SetConsoleMode failed: %lu\n", GetLastError());
ret = GetConsoleMode(output, &mode); - ok(ret, "GetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "GetConsoleMode failed: %lu\n", GetLastError()); mode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; - ok(mode == (ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT), "mode = %x\n", mode); + ok(mode == (ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT), "mode = %lx\n", mode);
ret = SetConsoleMode(output, mode & ~ENABLE_WRAP_AT_EOL_OUTPUT); - ok(ret, "SetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "SetConsoleMode failed: %lu\n", GetLastError());
ret = GetConsoleMode(output, &mode); - ok(ret, "GetConsoleMode failed: %u\n", GetLastError()); - ok(mode == ENABLE_PROCESSED_OUTPUT, "mode = %x\n", mode); + ok(ret, "GetConsoleMode failed: %lu\n", GetLastError()); + ok(mode == ENABLE_PROCESSED_OUTPUT, "mode = %lx\n", mode);
ret = SetConsoleMode(output, mode | ENABLE_WRAP_AT_EOL_OUTPUT); - ok(ret, "SetConsoleMode failed: %u\n", GetLastError()); + ok(ret, "SetConsoleMode failed: %lu\n", GetLastError());
ret = GetConsoleScreenBufferInfo(output, &sb_info); - ok(ret, "GetConsoleScreenBufferInfo failed: %u\n", GetLastError()); + ok(ret, "GetConsoleScreenBufferInfo failed: %lu\n", GetLastError()); ok(sb_info.dwSize.X == 40, "dwSize.X = %u\n", sb_info.dwSize.X); ok(sb_info.dwSize.Y == 30, "dwSize.Y = %u\n", sb_info.dwSize.Y); ok(sb_info.dwCursorPosition.X == 0, "dwCursorPosition.X = %u\n", sb_info.dwCursorPosition.X); @@ -4577,8 +4578,8 @@ static void test_pseudo_console_child(HANDLE input, HANDLE output) ok(sb_info.dwMaximumWindowSize.Y == 30, "dwMaximumWindowSize.Y = %u\n", sb_info.dwMaximumWindowSize.Y);
ret = GetConsoleCursorInfo(output, &cursor_info); - ok(ret, "GetConsoleCursorInfo failed: %u\n", GetLastError()); - ok(cursor_info.dwSize == 25, "dwSize = %u\n", cursor_info.dwSize); + ok(ret, "GetConsoleCursorInfo failed: %lu\n", GetLastError()); + ok(cursor_info.dwSize == 25, "dwSize = %lu\n", cursor_info.dwSize); ok(cursor_info.bVisible == TRUE, "bVisible = %x\n", cursor_info.bVisible);
hwnd = GetConsoleWindow(); @@ -4593,7 +4594,7 @@ static DWORD WINAPI read_pipe_proc( void *handle ) char buf[64]; DWORD size; while (ReadFile(handle, buf, sizeof(buf), &size, NULL)); - ok(GetLastError() == ERROR_BROKEN_PIPE, "ReadFile returned %u\n", GetLastError()); + ok(GetLastError() == ERROR_BROKEN_PIPE, "ReadFile returned %lu\n", GetLastError()); CloseHandle(handle); return 0; } @@ -4618,11 +4619,11 @@ static void test_pseudo_console(void)
console_pipe = CreateNamedPipeW(L"\\.\pipe\pseudoconsoleconn", PIPE_ACCESS_DUPLEX, PIPE_WAIT | PIPE_TYPE_BYTE, 1, 4096, 4096, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(console_pipe != INVALID_HANDLE_VALUE, "CreateNamedPipeW failed: %u\n", GetLastError()); + ok(console_pipe != INVALID_HANDLE_VALUE, "CreateNamedPipeW failed: %lu\n", GetLastError());
console_pipe2 = CreateFileW(L"\\.\pipe\pseudoconsoleconn", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - ok(console_pipe2 != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(console_pipe2 != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
thread = CreateThread( NULL, 0, read_pipe_proc, console_pipe, 0, NULL ); CloseHandle(thread); @@ -4630,17 +4631,17 @@ static void test_pseudo_console(void) size.X = 0; size.Y = 30; hres = pCreatePseudoConsole(size, console_pipe2, console_pipe2, 0, &pseudo_console); - ok(hres == E_INVALIDARG, "CreatePseudoConsole failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "CreatePseudoConsole failed: %08lx\n", hres);
size.X = 40; size.Y = 0; hres = pCreatePseudoConsole(size, console_pipe2, console_pipe2, 0, &pseudo_console); - ok(hres == E_INVALIDARG, "CreatePseudoConsole failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "CreatePseudoConsole failed: %08lx\n", hres);
size.X = 40; size.Y = 30; hres = pCreatePseudoConsole(size, console_pipe2, console_pipe2, 0, &pseudo_console); - ok(hres == S_OK, "CreatePseudoConsole failed: %08x\n", hres); + ok(hres == S_OK, "CreatePseudoConsole failed: %08lx\n", hres); CloseHandle(console_pipe2);
InitializeProcThreadAttributeList(NULL, 1, 0, &attr_size); @@ -4652,7 +4653,7 @@ static void test_pseudo_console(void) winetest_get_mainargs(&argv); sprintf(cmdline, ""%s" %s --pseudo-console", argv[0], argv[1]); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, &startup.StartupInfo, &info); - ok(ret, "CreateProcessW failed: %u\n", GetLastError()); + ok(ret, "CreateProcessW failed: %lu\n", GetLastError());
CloseHandle(info.hThread); HeapFree(GetProcessHeap(), 0, startup.lpAttributeList); @@ -4679,7 +4680,7 @@ START_TEST(console) if (argc > 3 && !strcmp(argv[2], "attach_console")) { DWORD parent_pid; - sscanf(argv[3], "%x", &parent_pid); + sscanf(argv[3], "%lx", &parent_pid); test_AttachConsole_child(parent_pid); return; } @@ -4721,18 +4722,18 @@ START_TEST(console) err = RegSetValueExA(console_key, "FaceName", 0, REG_SZ, (const BYTE *) font_name, sizeof(font_name)); if (err != ERROR_SUCCESS) - trace("Unable to change default console font, error %d\n", err); + trace("Unable to change default console font, error %ld\n", err); } else { - trace("Unable to query default console font, error %d\n", err); + trace("Unable to query default console font, error %ld\n", err); RegCloseKey(console_key); console_key = NULL; } } else { - trace("Unable to open HKCU\Console, error %d\n", err); + trace("Unable to open HKCU\Console, error %ld\n", err); console_key = NULL; }
@@ -4748,7 +4749,7 @@ START_TEST(console) else err = RegSetValueExA(console_key, "FaceName", 0, REG_SZ, (const BYTE *) old_font, strlen(old_font) + 1); - ok(err == ERROR_SUCCESS, "Unable to restore default console font, error %d\n", err); + ok(err == ERROR_SUCCESS, "Unable to restore default console font, error %ld\n", err); } }
@@ -4765,7 +4766,7 @@ START_TEST(console) revert_output = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); sb = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ok(sb != INVALID_HANDLE_VALUE, "Could not allocate screen buffer: %u\n", GetLastError()); + ok(sb != INVALID_HANDLE_VALUE, "Could not allocate screen buffer: %lu\n", GetLastError()); SetConsoleActiveScreenBuffer(sb); }
@@ -4795,7 +4796,7 @@ START_TEST(console) ok(ret, "Setting sb info\n"); ret = GetConsoleScreenBufferInfo(hConOut, &sbi); ok(ret, "Getting sb info\n"); - ok(sbi.dwSize.Y == size, "Unexpected buffer size: %d instead of %d\n", sbi.dwSize.Y, size); + ok(sbi.dwSize.Y == size, "Unexpected buffer size: %d instead of %ld\n", sbi.dwSize.Y, size); if (!ret) return;
test_ReadConsole(hConIn);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ninput/tests/Makefile.in | 1 - dlls/ninput/tests/ninput.c | 48 +++++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/dlls/ninput/tests/Makefile.in b/dlls/ninput/tests/Makefile.in index 6ff69c9ba4f..9c0b44fa17d 100644 --- a/dlls/ninput/tests/Makefile.in +++ b/dlls/ninput/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ninput.dll IMPORTS = ninput
diff --git a/dlls/ninput/tests/ninput.c b/dlls/ninput/tests/ninput.c index 7fd389378b0..54ea6f0b34b 100644 --- a/dlls/ninput/tests/ninput.c +++ b/dlls/ninput/tests/ninput.c @@ -25,14 +25,14 @@ static void test_context(void) HRESULT hr;
hr = CreateInteractionContext(&context); - ok(hr == S_OK, "Failed to create context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create context, hr %#lx.\n", hr); hr = DestroyInteractionContext(context); - ok(hr == S_OK, "Failed to destroy context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to destroy context, hr %#lx.\n", hr);
hr = CreateInteractionContext(NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = DestroyInteractionContext(NULL); - ok(hr == E_HANDLE, "Got hr %#x.\n", hr); + ok(hr == E_HANDLE, "Got hr %#lx.\n", hr); }
static void test_properties(void) @@ -42,44 +42,44 @@ static void test_properties(void) HRESULT hr;
hr = CreateInteractionContext(&context); - ok(hr == S_OK, "Failed to create context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create context, hr %#lx.\n", hr);
hr = GetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, &value); - ok(hr == S_OK, "Failed to get property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get property, hr %#lx.\n", hr); ok(value == TRUE, "Got unexpected value %#x.\n", value);
hr = SetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, TRUE); - ok(hr == S_OK, "Failed to set property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set property, hr %#lx.\n", hr); hr = GetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, &value); - ok(hr == S_OK, "Failed to get property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get property, hr %#lx.\n", hr); ok(value == TRUE, "Got unexpected value %#x.\n", value);
hr = SetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, FALSE); - ok(hr == S_OK, "Failed to set property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set property, hr %#lx.\n", hr); hr = GetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, &value); - ok(hr == S_OK, "Failed to get property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get property, hr %#lx.\n", hr); ok(value == FALSE, "Got unexpected value %#x.\n", value);
hr = SetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, 2); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = SetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, 3); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = SetPropertyInteractionContext(context, 0xdeadbeef, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = GetPropertyInteractionContext(context, 0xdeadbeef, &value); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = GetPropertyInteractionContext(context, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = SetPropertyInteractionContext(NULL, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, FALSE); - ok(hr == E_HANDLE, "Got hr %#x.\n", hr); + ok(hr == E_HANDLE, "Got hr %#lx.\n", hr); hr = GetPropertyInteractionContext(NULL, INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, &value); - ok(hr == E_HANDLE, "Got hr %#x.\n", hr); + ok(hr == E_HANDLE, "Got hr %#lx.\n", hr);
hr = DestroyInteractionContext(context); - ok(hr == S_OK, "Failed to destroy context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to destroy context, hr %#lx.\n", hr); }
static void test_configuration(void) @@ -101,20 +101,20 @@ static void test_configuration(void) };
hr = CreateInteractionContext(&context); - ok(hr == S_OK, "Failed to create context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create context, hr %#lx.\n", hr);
hr = SetInteractionConfigurationInteractionContext(NULL, 0, NULL); - ok(hr == E_HANDLE, "Got hr %#x.\n", hr); + ok(hr == E_HANDLE, "Got hr %#lx.\n", hr); hr = SetInteractionConfigurationInteractionContext(context, 0, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = SetInteractionConfigurationInteractionContext(context, 1, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = SetInteractionConfigurationInteractionContext(context, ARRAY_SIZE(config), config); - ok(hr == S_OK, "Failed to set configuration, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set configuration, hr %#lx.\n", hr);
hr = DestroyInteractionContext(context); - ok(hr == S_OK, "Failed to destroy context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to destroy context, hr %#lx.\n", hr); }
START_TEST(ninput)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/nsi/tests/Makefile.in | 1 dlls/nsi/tests/nsi.c | 202 ++++++++++++++++++++++---------------------- 2 files changed, 101 insertions(+), 102 deletions(-)
diff --git a/dlls/nsi/tests/Makefile.in b/dlls/nsi/tests/Makefile.in index f43da86076c..98129935198 100644 --- a/dlls/nsi/tests/Makefile.in +++ b/dlls/nsi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = nsi.dll IMPORTS = nsi uuid iphlpapi
diff --git a/dlls/nsi/tests/nsi.c b/dlls/nsi/tests/nsi.c index fc85d4ba8ff..03397029c45 100644 --- a/dlls/nsi/tests/nsi.c +++ b/dlls/nsi/tests/nsi.c @@ -62,19 +62,19 @@ static void test_nsi_api( void ) (void **)&stat_tbl, sizeof(*stat_tbl), &count, 0 ); if (!err) break; } - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); rw_size = rw_sizes[i];
for (i = 0; i < count; i++) { - winetest_push_context( "%d", i ); + winetest_push_context( "%ld", i ); rw = (struct nsi_ndis_ifinfo_rw *)((BYTE *)rw_tbl + i * rw_size); dyn = dyn_tbl + i; stat = stat_tbl + i;
err = NsiGetAllParameters( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl), &get_rw, rw_size, &get_dyn, sizeof(get_dyn), &get_stat, sizeof(get_stat) ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); /* test a selection of members */ ok( IsEqualGUID( &get_rw.network_guid, &rw->network_guid ), "mismatch\n" ); ok( get_rw.alias.Length == rw->alias.Length, "mismatch\n" ); @@ -103,7 +103,7 @@ static void test_nsi_api( void ) get_all_params.static_size = sizeof(get_stat);
err = NsiGetAllParametersEx( &get_all_params ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); /* test a selection of members */ ok( IsEqualGUID( &get_rw.network_guid, &rw->network_guid ), "mismatch\n" ); ok( get_rw.alias.Length == rw->alias.Length, "mismatch\n" ); @@ -121,20 +121,20 @@ static void test_nsi_api( void ) err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl), NSI_PARAM_TYPE_RW, &get_rw.alias, sizeof(get_rw.alias), FIELD_OFFSET(struct nsi_ndis_ifinfo_rw, alias) ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( get_rw.alias.Length == rw->alias.Length, "mismatch\n" ); ok( !memcmp( get_rw.alias.String, rw->alias.String, rw->alias.Length ), "mismatch\n" );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl), NSI_PARAM_TYPE_STATIC, &get_stat.if_index, sizeof(get_stat.if_index), FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_index) ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( get_stat.if_index == stat->if_index, "mismatch\n" );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl), NSI_PARAM_TYPE_STATIC, &get_stat.if_guid, sizeof(get_stat.if_guid), FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid) ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( IsEqualGUID( &get_stat.if_guid, &stat->if_guid ), "mismatch\n" );
memset( &get_rw, 0xcc, sizeof(get_rw) ); @@ -153,7 +153,7 @@ static void test_nsi_api( void ) get_param.data_size = sizeof(get_rw.alias); get_param.data_offset = FIELD_OFFSET(struct nsi_ndis_ifinfo_rw, alias); err = NsiGetParameterEx( &get_param ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( get_rw.alias.Length == rw->alias.Length, "mismatch\n" ); ok( !memcmp( get_rw.alias.String, rw->alias.String, rw->alias.Length ), "mismatch\n" );
@@ -162,7 +162,7 @@ static void test_nsi_api( void ) get_param.data_size = sizeof(get_stat.if_index); get_param.data_offset = FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_index); err = NsiGetParameterEx( &get_param ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( get_stat.if_index == stat->if_index, "mismatch\n" );
get_param.param_type = NSI_PARAM_TYPE_STATIC; @@ -170,7 +170,7 @@ static void test_nsi_api( void ) get_param.data_size = sizeof(get_stat.if_guid); get_param.data_offset = FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid); err = NsiGetParameterEx( &get_param ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( IsEqualGUID( &get_stat.if_guid, &stat->if_guid ), "mismatch\n" ); winetest_pop_context(); } @@ -179,7 +179,7 @@ static void test_nsi_api( void ) err = NsiEnumerateObjectsAllParameters( 1, 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, NULL, 0, NULL, 0, NULL, 0, NULL, 0, &enum_count ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( enum_count == count, "mismatch\n" );
enum_luid_tbl = malloc( count * sizeof(*enum_luid_tbl) ); @@ -191,12 +191,12 @@ static void test_nsi_api( void ) enum_luid_tbl, sizeof(*enum_luid_tbl), enum_rw_tbl, rw_size, enum_dyn_tbl, sizeof(*enum_dyn_tbl), enum_stat_tbl, sizeof(*enum_stat_tbl), &enum_count ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( enum_count == count, "mismatch\n" );
for (i = 0; i < count; i++) { - winetest_push_context( "%d", i ); + winetest_push_context( "%ld", i ); rw = (struct nsi_ndis_ifinfo_rw *)((BYTE *)rw_tbl + i * rw_size); enum_rw = (struct nsi_ndis_ifinfo_rw *)((BYTE *)enum_rw_tbl + i * rw_size); dyn = dyn_tbl + i; @@ -226,11 +226,11 @@ static void test_nsi_api( void ) enum_luid_tbl, sizeof(*enum_luid_tbl), enum_rw_tbl, rw_size, enum_dyn_tbl, sizeof(*enum_dyn_tbl), enum_stat_tbl, sizeof(*enum_stat_tbl), &enum_count ); - ok( err == ERROR_MORE_DATA, "got %d\n", err ); + ok( err == ERROR_MORE_DATA, "got %ld\n", err ); ok( enum_count == count - 1, "mismatch\n" );
for (i = 0; i < enum_count; i++) /* for simplicity just check the luids */ - ok( enum_luid_tbl[i].Value == luid_tbl[i].Value, "%d: mismatch\n", i ); + ok( enum_luid_tbl[i].Value == luid_tbl[i].Value, "%ld: mismatch\n", i ); }
memset( &enum_params, 0, sizeof(enum_params) ); @@ -249,7 +249,7 @@ static void test_nsi_api( void ) enum_params.count = count;
err = NsiEnumerateObjectsAllParametersEx( &enum_params ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( enum_params.count == count, "mismatch\n" );
free( enum_luid_tbl ); @@ -279,21 +279,21 @@ static void test_ndis_ifinfo( void ) (void **)&stat_tbl, sizeof(*stat_tbl), &count, 0 ); if (!err) break; } - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); if (err) return; rw_size = rw_sizes[i];
err = GetIfTable2( &table ); - ok( !err, "got %d\n", err ); - ok( table->NumEntries == count, "table entries %d count %d\n", table->NumEntries, count ); + ok( !err, "got %ld\n", err ); + ok( table->NumEntries == count, "table entries %ld count %ld\n", table->NumEntries, count );
/* Grab the dyn table again to provide an upper bound for the stats returned from GetIfTable2(). (The luids must be retrieved again otherwise NsiAllocateAndGetTable() fails). */ err = NsiAllocateAndGetTable( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, (void **)&luid_tbl_2, sizeof(*luid_tbl_2), NULL, 0, (void **)&dyn_tbl_2, sizeof(*dyn_tbl_2), NULL, 0, &count, 0 ); - ok( !err, "got %d\n", err ); - ok( table->NumEntries == count, "table entries %d count %d\n", table->NumEntries, count ); + ok( !err, "got %ld\n", err ); + ok( table->NumEntries == count, "table entries %ld count %ld\n", table->NumEntries, count );
for (i = 0; i < count; i++) { @@ -303,7 +303,7 @@ static void test_ndis_ifinfo( void ) struct nsi_ndis_ifinfo_dynamic *dyn = dyn_tbl + i, *dyn_2 = dyn_tbl_2 + i; struct nsi_ndis_ifinfo_static *stat = stat_tbl + i;
- winetest_push_context( "%d", i ); + winetest_push_context( "%ld", i ); ok( row->InterfaceLuid.Value == luid->Value, "mismatch\n" ); ok( row->InterfaceIndex == stat->if_index, "mismatch\n" ); ok( IsEqualGUID( &row->InterfaceGuid, &stat->if_guid ), "mismatch\n" ); @@ -367,25 +367,25 @@ static void test_ndis_ifinfo( void ) err = NsiGetAllParameters( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl, sizeof(*luid_tbl), &rw_get, rw_size, &dyn_get, sizeof(dyn_get), &stat_get, sizeof(stat_get) ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( IsEqualGUID( &stat_tbl[0].if_guid, &stat_get.if_guid ), "mismatch\n" );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl, sizeof(*luid_tbl), NSI_PARAM_TYPE_STATIC, &stat_get.if_guid, sizeof(stat_get.if_guid), FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid) ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); ok( IsEqualGUID( &stat_tbl[0].if_guid, &stat_get.if_guid ), "mismatch\n" );
luid_get.Value = ~0u; err = NsiGetAllParameters( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, &luid_get, sizeof(luid_get), &rw_get, rw_size, &dyn_get, sizeof(dyn_get), &stat_get, sizeof(stat_get) ); - ok( err == ERROR_FILE_NOT_FOUND, "got %d\n", err ); + ok( err == ERROR_FILE_NOT_FOUND, "got %ld\n", err );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, &luid_get, sizeof(luid_get), NSI_PARAM_TYPE_STATIC, &stat_get.if_guid, sizeof(stat_get.if_guid), FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid) ); - ok( err == ERROR_FILE_NOT_FOUND, "got %d\n", err ); + ok( err == ERROR_FILE_NOT_FOUND, "got %ld\n", err );
FreeMibTable( table ); NsiFreeTable( luid_tbl_2, NULL, dyn_tbl_2, NULL ); @@ -403,22 +403,22 @@ static void test_ndis_index_luid( void ) /* first get the luids */ err = NsiAllocateAndGetTable( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, (void **)&luids, sizeof(*luids), NULL, 0, NULL, 0, NULL, 0, &count, 0 ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err );
for (i = 0; i < count; i++) { ConvertInterfaceLuidToIndex( luids + i, &index ); err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_INDEX_LUID_TABLE, &index, sizeof(index), NSI_PARAM_TYPE_STATIC, &luid, sizeof(luid), 0 ); - ok( !err, "got %d\n", err ); - ok( luid.Value == luids[i].Value, "%d: luid mismatch\n", i ); + ok( !err, "got %ld\n", err ); + ok( luid.Value == luids[i].Value, "%ld: luid mismatch\n", i ); } NsiFreeTable( luids, NULL, NULL, NULL );
index = ~0u; err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_INDEX_LUID_TABLE, &index, sizeof(index), NSI_PARAM_TYPE_STATIC, &luid, sizeof(luid), 0 ); - ok( err == ERROR_FILE_NOT_FOUND, "got %d\n", err ); + ok( err == ERROR_FILE_NOT_FOUND, "got %ld\n", err ); }
static void test_ip_cmpt( int family ) @@ -440,17 +440,17 @@ static void test_ip_cmpt( int family ) err = NsiGetAllParameters( 1, mod, 2, &key, sizeof(key), &rw, rw_sizes[i], &dyn, sizeof(dyn), NULL, 0 ); if (!err) break; } - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err );
err = GetIpStatisticsEx( &table, family ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); if (err) goto err;
- ok( table.dwForwarding - 1 == rw.not_forwarding, "%x vs %x\n", table.dwForwarding, rw.not_forwarding ); - ok( table.dwDefaultTTL == rw.default_ttl, "%x vs %x\n", table.dwDefaultTTL, rw.default_ttl ); - ok( table.dwNumIf == dyn.num_ifs, "%x vs %x\n", table.dwNumIf, dyn.num_ifs ); - ok( table.dwNumAddr == dyn.num_addrs, "%x vs %x\n", table.dwNumAddr, dyn.num_addrs ); - ok( table.dwNumRoutes == dyn.num_routes, "%x vs %x\n", table.dwNumRoutes, dyn.num_routes ); + ok( table.dwForwarding - 1 == rw.not_forwarding, "%lx vs %lx\n", table.dwForwarding, rw.not_forwarding ); + ok( table.dwDefaultTTL == rw.default_ttl, "%lx vs %lx\n", table.dwDefaultTTL, rw.default_ttl ); + ok( table.dwNumIf == dyn.num_ifs, "%lx vs %lx\n", table.dwNumIf, dyn.num_ifs ); + ok( table.dwNumAddr == dyn.num_addrs, "%lx vs %lx\n", table.dwNumAddr, dyn.num_addrs ); + ok( table.dwNumRoutes == dyn.num_routes, "%lx vs %lx\n", table.dwNumRoutes, dyn.num_routes );
err: winetest_pop_context(); @@ -466,15 +466,15 @@ static void test_ip_icmpstats( int family ) winetest_push_context( family == AF_INET ? "AF_INET" : "AF_INET6" );
err = NsiGetAllParameters( 1, mod, NSI_IP_ICMPSTATS_TABLE, NULL, 0, NULL, 0, &nsi_stats, sizeof(nsi_stats), NULL, 0 ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); if (err) goto err;
err = GetIcmpStatisticsEx( &table, family ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); if (err) goto err;
err = NsiGetAllParameters( 1, mod, NSI_IP_ICMPSTATS_TABLE, NULL, 0, NULL, 0, &nsi_stats2, sizeof(nsi_stats2), NULL, 0 ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err );
expect_bounded( "icmpInStats.dwMsgs", table.icmpInStats.dwMsgs, nsi_stats.in_msgs, nsi_stats2.in_msgs ); expect_bounded( "icmpInStats.dwErrors", table.icmpInStats.dwErrors, nsi_stats.in_errors, nsi_stats2.in_errors ); @@ -482,7 +482,7 @@ static void test_ip_icmpstats( int family ) expect_bounded( "icmpOutStats.dwErrors", table.icmpOutStats.dwErrors, nsi_stats.out_errors, nsi_stats2.out_errors ); for (i = 0; i < ARRAY_SIZE(nsi_stats.in_type_counts); i++) { - winetest_push_context( "%d", i ); + winetest_push_context( "%ld", i ); expect_bounded( "icmpInStats.rgdwTypeCount", table.icmpInStats.rgdwTypeCount[i], nsi_stats.in_type_counts[i], nsi_stats2.in_type_counts[i] ); expect_bounded( "icmpOutStats.rgdwTypeCount", table.icmpOutStats.rgdwTypeCount[i], nsi_stats.out_type_counts[i], nsi_stats2.out_type_counts[i] ); winetest_pop_context(); @@ -505,14 +505,14 @@ static void test_ip_ipstats( int family ) /* The table appears to consist of a single object without a key. The rw data does exist but isn't part of GetIpStatisticsEx() and isn't yet tested */ err = NsiGetAllParameters( 1, mod, NSI_IP_IPSTATS_TABLE, NULL, 0, NULL, 0, &dyn, sizeof(dyn), &stat, sizeof(stat) ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err ); if (err) goto err;
err = GetIpStatisticsEx( &table, family ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err );
err = NsiGetAllParameters( 1, mod, NSI_IP_IPSTATS_TABLE, NULL, 0, NULL, 0, &dyn2, sizeof(dyn2), NULL, 0 ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err );
/* dwForwarding and dwDefaultTTL come from the compartment table */ expect_bounded( "dwInReceives", table.dwInReceives, dyn.in_recv, dyn2.in_recv ); @@ -526,7 +526,7 @@ static void test_ip_ipstats( int family ) expect_bounded( "dwRoutingDiscards", table.dwRoutingDiscards, dyn.routing_discards, dyn2.routing_discards ); expect_bounded( "dwOutDiscards", table.dwOutDiscards, dyn.out_discards, dyn2.out_discards ); expect_bounded( "dwOutNoRoutes", table.dwOutNoRoutes, dyn.out_no_routes, dyn2.out_no_routes ); - ok( table.dwReasmTimeout == stat.reasm_timeout, "bad timeout %d != %d\n", table.dwReasmTimeout, stat.reasm_timeout ); + ok( table.dwReasmTimeout == stat.reasm_timeout, "bad timeout %ld != %ld\n", table.dwReasmTimeout, stat.reasm_timeout ); expect_bounded( "dwReasmReqds", table.dwReasmReqds, dyn.reasm_reqds, dyn2.reasm_reqds ); expect_bounded( "dwReasmOks", table.dwReasmOks, dyn.reasm_oks, dyn2.reasm_oks ); expect_bounded( "dwReasmFails", table.dwReasmFails, dyn.reasm_fails, dyn2.reasm_fails ); @@ -561,12 +561,12 @@ static void test_ip_unicast( int family ) (void **)&stat_tbl, sizeof(*stat_tbl), &count, 0 ); if (!err) break; } - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); rw_size = rw_sizes[i];
err = GetUnicastIpAddressTable( family, &table ); - ok( !err, "got %d\n", err ); - ok( table->NumEntries == count, "table entries %d count %d\n", table->NumEntries, count ); + ok( !err, "got %ld\n", err ); + ok( table->NumEntries == count, "table entries %ld count %ld\n", table->NumEntries, count );
for (i = 0; i < count; i++) { @@ -574,7 +574,7 @@ static void test_ip_unicast( int family ) rw = (struct nsi_ip_unicast_rw *)((BYTE *)rw_tbl + i * rw_size); dyn = dyn_tbl + i; stat = stat_tbl + i; - winetest_push_context( "%d", i ); + winetest_push_context( "%ld", i );
ok( row->Address.si_family == family, "mismatch\n" );
@@ -606,7 +606,7 @@ static void test_ip_unicast( int family ) get_key.addr.s_addr = 0; err = NsiGetAllParameters( 1, &NPI_MS_IPV4_MODULEID, NSI_IP_UNICAST_TABLE, &get_key, sizeof(get_key), &get_rw, rw_size, &get_dyn, sizeof(get_dyn), &get_stat, sizeof(get_stat) ); - ok( err == ERROR_NOT_FOUND, "got %d\n", err ); + ok( err == ERROR_NOT_FOUND, "got %ld\n", err );
FreeMibTable( table ); NsiFreeTable( key_tbl, rw_tbl, dyn_tbl, stat_tbl ); @@ -632,22 +632,22 @@ static void test_ip_neighbour( int family ) (void **)&rw_tbl, sizeof(*rw), (void **)&dyn_tbl, sizeof(*dyn), NULL, 0, &count, 0 ); todo_wine_if( family == AF_INET6 ) - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err ); if (err) goto err;
err = GetIpNetTable2( family, &table ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err );
err = NsiAllocateAndGetTable( 1, mod, NSI_IP_NEIGHBOUR_TABLE, (void **)&key_tbl_2, key_size, NULL, 0, (void **)&dyn_tbl_2, sizeof(*dyn), NULL, 0, &count2, 0 ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err ); if (count == count2 && !memcmp( dyn_tbl, dyn_tbl_2, count * sizeof(*dyn) )) break; NsiFreeTable( key_tbl_2, NULL, dyn_tbl_2, NULL ); NsiFreeTable( key_tbl, rw_tbl, dyn_tbl, NULL ); }
- ok( count == table->NumEntries, "%d vs %d\n", count, table->NumEntries ); + ok( count == table->NumEntries, "%ld vs %ld\n", count, table->NumEntries );
for (i = 0; i < count; i++) { @@ -658,7 +658,7 @@ static void test_ip_neighbour( int family ) if (family == AF_INET) { key4 = key_tbl + i; - ok( key4->addr.s_addr == row->Address.Ipv4.sin_addr.s_addr, "%08x vs %08x\n", key4->addr.s_addr, + ok( key4->addr.s_addr == row->Address.Ipv4.sin_addr.s_addr, "%08lx vs %08lx\n", key4->addr.s_addr, row->Address.Ipv4.sin_addr.s_addr ); ok( key4->luid.Value == row->InterfaceLuid.Value, "%s vs %s\n", wine_dbgstr_longlong( key4->luid.Value ), wine_dbgstr_longlong( row->InterfaceLuid.Value ) ); @@ -674,10 +674,10 @@ static void test_ip_neighbour( int family )
ok( dyn->phys_addr_len == row->PhysicalAddressLength, "mismatch\n" ); ok( !memcmp( rw->phys_addr, row->PhysicalAddress, dyn->phys_addr_len ), "mismatch\n" ); - ok( dyn->state == row->State, "%x vs %x\n", dyn->state, row->State ); + ok( dyn->state == row->State, "%lx vs %x\n", dyn->state, row->State ); ok( dyn->flags.is_router == row->IsRouter, "%x vs %x\n", dyn->flags.is_router, row->IsRouter ); ok( dyn->flags.is_unreachable == row->IsUnreachable, "%x vs %x\n", dyn->flags.is_unreachable, row->IsUnreachable ); - ok( dyn->time == row->ReachabilityTime.LastReachable, "%x vs %x\n", dyn->time, row->ReachabilityTime.LastReachable ); + ok( dyn->time == row->ReachabilityTime.LastReachable, "%lx vs %lx\n", dyn->time, row->ReachabilityTime.LastReachable ); }
NsiFreeTable( key_tbl_2, NULL, dyn_tbl_2, NULL ); @@ -716,7 +716,7 @@ static void test_ip_forward( int family ) NULL, 0, &count, 0 ); if (!err) break; } - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); if (err) { winetest_pop_context(); return; } rw_size = rw_sizes[i]; NsiFreeTable( key_tbl, rw_tbl, NULL, NULL ); @@ -728,19 +728,19 @@ static void test_ip_forward( int family ) (void **)&stat_tbl, sizeof(*stat_tbl), &count, 0 ); if (!err) break; } - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); dyn_size = dyn_sizes[i];
err = GetIpForwardTable2( family, &table ); - ok( !err, "got %d\n", err ); - ok( table->NumEntries == count, "table entries %d count %d\n", table->NumEntries, count ); + ok( !err, "got %ld\n", err ); + ok( table->NumEntries == count, "table entries %ld count %ld\n", table->NumEntries, count );
for (i = 0; i < count; i++) { MIB_IPFORWARD_ROW2 *row = table->Table + i; rw = (struct nsi_ip_forward_rw *)((BYTE *)rw_tbl + i * rw_size); stat = stat_tbl + i; - winetest_push_context( "%d", i ); + winetest_push_context( "%ld", i );
ok( row->DestinationPrefix.Prefix.si_family == family, "mismatch\n" );
@@ -811,31 +811,31 @@ static void test_tcp_stats( int family )
err = NsiGetAllParameters( 1, &NPI_MS_TCP_MODULEID, NSI_TCP_STATS_TABLE, &key, sizeof(key), NULL, 0, &dyn, sizeof(dyn), &stat, sizeof(stat) ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err );
err = GetTcpStatisticsEx( &table, family ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err );
err = NsiGetAllParameters( 1, &NPI_MS_TCP_MODULEID, NSI_TCP_STATS_TABLE, &key, sizeof(key), NULL, 0, &dyn2, sizeof(dyn), NULL, 0 ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err );
- ok( table.dwRtoAlgorithm == stat.rto_algo, "%d vs %d\n", table.dwRtoAlgorithm, stat.rto_algo ); - ok( table.dwRtoMin == stat.rto_min, "%d vs %d\n", table.dwRtoMin, stat.rto_min ); - ok( table.dwRtoMax == stat.rto_max, "%d vs %d\n", table.dwRtoMax, stat.rto_max ); - ok( table.dwMaxConn == stat.max_conns, "%d vs %d\n", table.dwMaxConn, stat.max_conns ); + ok( table.dwRtoAlgorithm == stat.rto_algo, "%ld vs %ld\n", table.dwRtoAlgorithm, stat.rto_algo ); + ok( table.dwRtoMin == stat.rto_min, "%ld vs %ld\n", table.dwRtoMin, stat.rto_min ); + ok( table.dwRtoMax == stat.rto_max, "%ld vs %ld\n", table.dwRtoMax, stat.rto_max ); + ok( table.dwMaxConn == stat.max_conns, "%ld vs %ld\n", table.dwMaxConn, stat.max_conns );
- ok( unstable( table.dwActiveOpens == dyn.active_opens ), "%d vs %d\n", table.dwActiveOpens, dyn.active_opens ); - ok( unstable( table.dwPassiveOpens == dyn.passive_opens ), "%d vs %d\n", table.dwPassiveOpens, dyn.passive_opens ); + ok( unstable( table.dwActiveOpens == dyn.active_opens ), "%ld vs %ld\n", table.dwActiveOpens, dyn.active_opens ); + ok( unstable( table.dwPassiveOpens == dyn.passive_opens ), "%ld vs %ld\n", table.dwPassiveOpens, dyn.passive_opens ); expect_bounded( "dwAttemptFails", table.dwAttemptFails, dyn.attempt_fails, dyn2.attempt_fails ); expect_bounded( "dwEstabResets", table.dwEstabResets, dyn.est_rsts, dyn2.est_rsts ); - ok( unstable( table.dwCurrEstab == dyn.cur_est ), "%d vs %d\n", table.dwCurrEstab, dyn.cur_est ); + ok( unstable( table.dwCurrEstab == dyn.cur_est ), "%ld vs %ld\n", table.dwCurrEstab, dyn.cur_est ); expect_bounded( "dwInSegs", table.dwInSegs, dyn.in_segs, dyn2.in_segs ); expect_bounded( "dwOutSegs", table.dwOutSegs, dyn.out_segs, dyn2.out_segs ); expect_bounded( "dwRetransSegs", table.dwRetransSegs, dyn.retrans_segs, dyn2.retrans_segs ); expect_bounded( "dwInErrs", table.dwInErrs, dyn.in_errs, dyn2.in_errs ); expect_bounded( "dwOutRsts", table.dwOutRsts, dyn.out_rsts, dyn2.out_rsts ); - ok( unstable( table.dwNumConns == dyn.num_conns ), "%d vs %d\n", table.dwNumConns, dyn.num_conns ); + ok( unstable( table.dwNumConns == dyn.num_conns ), "%ld vs %ld\n", table.dwNumConns, dyn.num_conns );
winetest_pop_context(); } @@ -868,7 +868,7 @@ static void test_tcp_tables( int family, int table_type ) (void **)&dyn_tbl, dyn_sizes[i], (void **)&stat, sizeof(*stat), &count, 0 ); if (!err) break; } - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err ); dyn_size = dyn_sizes[i];
size = 0; @@ -877,7 +877,7 @@ static void test_tcp_tables( int family, int table_type ) table = malloc( size ); table6 = (MIB_TCP6TABLE_OWNER_MODULE *)table; err = GetExtendedTcpTable( table, &size, 0, family, table_type, 0 ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err );
row = table->table; row6 = table6->table; @@ -889,16 +889,16 @@ static void test_tcp_tables( int family, int table_type )
if (family == AF_INET) { - ok( unstable( row->dwLocalAddr == keys[i].local.Ipv4.sin_addr.s_addr ), "%08x vs %08x\n", + ok( unstable( row->dwLocalAddr == keys[i].local.Ipv4.sin_addr.s_addr ), "%08lx vs %08lx\n", row->dwLocalAddr, keys[i].local.Ipv4.sin_addr.s_addr ); - ok( unstable( row->dwLocalPort == keys[i].local.Ipv4.sin_port ), "%d vs %d\n", + ok( unstable( row->dwLocalPort == keys[i].local.Ipv4.sin_port ), "%ld vs %d\n", row->dwLocalPort, keys[i].local.Ipv4.sin_port ); - ok( unstable( row->dwRemoteAddr == keys[i].remote.Ipv4.sin_addr.s_addr ), "%08x vs %08x\n", + ok( unstable( row->dwRemoteAddr == keys[i].remote.Ipv4.sin_addr.s_addr ), "%08lx vs %08lx\n", row->dwRemoteAddr, keys[i].remote.Ipv4.sin_addr.s_addr ); - ok( unstable( row->dwRemotePort == keys[i].remote.Ipv4.sin_port ), "%d vs %d\n", + ok( unstable( row->dwRemotePort == keys[i].remote.Ipv4.sin_port ), "%ld vs %d\n", row->dwRemotePort, keys[i].remote.Ipv4.sin_port ); - ok( unstable( row->dwState == dyn->state ), "%x vs %x\n", row->dwState, dyn->state ); - ok( unstable( row->dwOwningPid == stat[i].pid ), "%x vs %x\n", row->dwOwningPid, stat[i].pid ); + ok( unstable( row->dwState == dyn->state ), "%lx vs %lx\n", row->dwState, dyn->state ); + ok( unstable( row->dwOwningPid == stat[i].pid ), "%lx vs %lx\n", row->dwOwningPid, stat[i].pid ); ok( unstable( row->liCreateTimestamp.QuadPart == stat[i].create_time ), "mismatch\n" ); ok( unstable( row->OwningModuleInfo[0] == stat[i].mod_info ), "mismatch\n"); row++; @@ -907,18 +907,18 @@ static void test_tcp_tables( int family, int table_type ) { ok( unstable( !memcmp( row6->ucLocalAddr, keys[i].local.Ipv6.sin6_addr.s6_addr, sizeof(IN6_ADDR) ) ), "mismatch\n" ); - ok( unstable( row6->dwLocalScopeId == keys[i].local.Ipv6.sin6_scope_id ), "%x vs %x\n", + ok( unstable( row6->dwLocalScopeId == keys[i].local.Ipv6.sin6_scope_id ), "%lx vs %lx\n", row6->dwLocalScopeId, keys[i].local.Ipv6.sin6_scope_id ); - ok( unstable( row6->dwLocalPort == keys[i].local.Ipv6.sin6_port ), "%d vs %d\n", + ok( unstable( row6->dwLocalPort == keys[i].local.Ipv6.sin6_port ), "%ld vs %d\n", row6->dwLocalPort, keys[i].local.Ipv6.sin6_port ); ok( unstable( !memcmp( row6->ucRemoteAddr, keys[i].remote.Ipv6.sin6_addr.s6_addr, sizeof(IN6_ADDR) ) ), "mismatch\n" ); - ok( unstable( row6->dwRemoteScopeId == keys[i].remote.Ipv6.sin6_scope_id ), "%x vs %x\n", + ok( unstable( row6->dwRemoteScopeId == keys[i].remote.Ipv6.sin6_scope_id ), "%lx vs %lx\n", row6->dwRemoteScopeId, keys[i].remote.Ipv6.sin6_scope_id ); - ok( unstable( row6->dwRemotePort == keys[i].remote.Ipv6.sin6_port ), "%d vs %d\n", + ok( unstable( row6->dwRemotePort == keys[i].remote.Ipv6.sin6_port ), "%ld vs %d\n", row6->dwRemotePort, keys[i].remote.Ipv6.sin6_port ); - ok( unstable( row6->dwState == dyn->state ), "%x vs %x\n", row6->dwState, dyn->state ); - ok( unstable( row6->dwOwningPid == stat[i].pid ), "%x vs %x\n", row6->dwOwningPid, stat[i].pid ); + ok( unstable( row6->dwState == dyn->state ), "%lx vs %lx\n", row6->dwState, dyn->state ); + ok( unstable( row6->dwOwningPid == stat[i].pid ), "%lx vs %lx\n", row6->dwOwningPid, stat[i].pid ); ok( unstable( row6->liCreateTimestamp.QuadPart == stat[i].create_time ), "mismatch\n" ); ok( unstable( row6->OwningModuleInfo[0] == stat[i].mod_info ), "mismatch\n"); row6++; @@ -941,20 +941,20 @@ static void test_udp_stats( int family )
err = NsiGetAllParameters( 1, &NPI_MS_UDP_MODULEID, NSI_UDP_STATS_TABLE, &key, sizeof(key), NULL, 0, &dyn, sizeof(dyn), NULL, 0 ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err );
err = GetUdpStatisticsEx( &table, family ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err );
err = NsiGetAllParameters( 1, &NPI_MS_UDP_MODULEID, NSI_UDP_STATS_TABLE, &key, sizeof(key), NULL, 0, &dyn2, sizeof(dyn2), NULL, 0 ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err );
expect_bounded( "dwInDatagrams", table.dwInDatagrams, dyn.in_dgrams, dyn2.in_dgrams ); expect_bounded( "dwNoPorts", table.dwNoPorts, dyn.no_ports, dyn2.no_ports ); expect_bounded( "dwInErrors", table.dwInErrors, dyn.in_errs, dyn2.in_errs ); expect_bounded( "dwOutDatagrams", table.dwOutDatagrams, dyn.out_dgrams, dyn2.out_dgrams ); - ok( unstable( table.dwNumAddrs == dyn.num_addrs ), "%d %d\n", table.dwNumAddrs, dyn.num_addrs ); + ok( unstable( table.dwNumAddrs == dyn.num_addrs ), "%ld %ld\n", table.dwNumAddrs, dyn.num_addrs );
winetest_pop_context(); } @@ -973,7 +973,7 @@ static void test_udp_tables( int family )
err = NsiAllocateAndGetTable( 1, &NPI_MS_UDP_MODULEID, NSI_UDP_ENDPOINT_TABLE, (void **)&keys, sizeof(*keys), NULL, 0, NULL, 0, (void **)&stat, sizeof(*stat), &count, 0 ); - ok( !err, "got %x\n", err ); + ok( !err, "got %lx\n", err );
size = 0; err = GetExtendedUdpTable( NULL, &size, 0, family, UDP_TABLE_OWNER_MODULE, 0 ); @@ -981,7 +981,7 @@ static void test_udp_tables( int family ) table = malloc( size ); table6 = (MIB_UDP6TABLE_OWNER_MODULE *)table; err = GetExtendedUdpTable( table, &size, 0, family, UDP_TABLE_OWNER_MODULE, 0 ); - ok( !err, "got %d\n", err ); + ok( !err, "got %ld\n", err );
row = table->table; row6 = table6->table; @@ -992,13 +992,13 @@ static void test_udp_tables( int family )
if (family == AF_INET) { - ok( unstable( row->dwLocalAddr == keys[i].local.Ipv4.sin_addr.s_addr ), "%08x vs %08x\n", + ok( unstable( row->dwLocalAddr == keys[i].local.Ipv4.sin_addr.s_addr ), "%08lx vs %08lx\n", row->dwLocalAddr, keys[i].local.Ipv4.sin_addr.s_addr ); - ok( unstable( row->dwLocalPort == keys[i].local.Ipv4.sin_port ), "%d vs %d\n", + ok( unstable( row->dwLocalPort == keys[i].local.Ipv4.sin_port ), "%ld vs %d\n", row->dwLocalPort, keys[i].local.Ipv4.sin_port ); - ok( unstable( row->dwOwningPid == stat[i].pid ), "%x vs %x\n", row->dwOwningPid, stat[i].pid ); + ok( unstable( row->dwOwningPid == stat[i].pid ), "%lx vs %lx\n", row->dwOwningPid, stat[i].pid ); ok( unstable( row->liCreateTimestamp.QuadPart == stat[i].create_time ), "mismatch\n" ); - ok( unstable( row->dwFlags == stat[i].flags ), "%x vs %x\n", row->dwFlags, stat[i].flags ); + ok( unstable( row->dwFlags == stat[i].flags ), "%x vs %lx\n", row->dwFlags, stat[i].flags ); ok( unstable( row->OwningModuleInfo[0] == stat[i].mod_info ), "mismatch\n"); row++; } @@ -1006,13 +1006,13 @@ static void test_udp_tables( int family ) { ok( unstable( !memcmp( row6->ucLocalAddr, keys[i].local.Ipv6.sin6_addr.s6_addr, sizeof(IN6_ADDR) ) ), "mismatch\n" ); - ok( unstable( row6->dwLocalScopeId == keys[i].local.Ipv6.sin6_scope_id ), "%x vs %x\n", + ok( unstable( row6->dwLocalScopeId == keys[i].local.Ipv6.sin6_scope_id ), "%lx vs %lx\n", row6->dwLocalScopeId, keys[i].local.Ipv6.sin6_scope_id ); - ok( unstable( row6->dwLocalPort == keys[i].local.Ipv6.sin6_port ), "%d vs %d\n", + ok( unstable( row6->dwLocalPort == keys[i].local.Ipv6.sin6_port ), "%ld vs %d\n", row6->dwLocalPort, keys[i].local.Ipv6.sin6_port ); - ok( unstable( row6->dwOwningPid == stat[i].pid ), "%x vs %x\n", row6->dwOwningPid, stat[i].pid ); + ok( unstable( row6->dwOwningPid == stat[i].pid ), "%lx vs %lx\n", row6->dwOwningPid, stat[i].pid ); ok( unstable( row6->liCreateTimestamp.QuadPart == stat[i].create_time ), "mismatch\n" ); - ok( unstable( row6->dwFlags == stat[i].flags ), "%x vs %x\n", row6->dwFlags, stat[i].flags ); + ok( unstable( row6->dwFlags == stat[i].flags ), "%x vs %lx\n", row6->dwFlags, stat[i].flags ); ok( unstable( row6->OwningModuleInfo[0] == stat[i].mod_info ), "mismatch\n"); row6++; }
On Wed, Mar 02, 2022 at 09:03:33AM +0100, Eric Pouech wrote:
Signed-off-by: Eric Pouech eric.pouech@gmail.com
dlls/nsi/tests/Makefile.in | 1 dlls/nsi/tests/nsi.c | 202 ++++++++++++++++++++++---------------------- 2 files changed, 101 insertions(+), 102 deletions(-)
Let's hold off on this one until we[1] decide what to do about nsiproxy and potentially include/wine/nsi.h
Huw. [1] The ball's in my court on this.
Le 03/03/2022 à 10:58, Huw Davies a écrit :
On Wed, Mar 02, 2022 at 09:03:33AM +0100, Eric Pouech wrote:
Signed-off-by: Eric Pouecheric.pouech@gmail.com
dlls/nsi/tests/Makefile.in | 1 dlls/nsi/tests/nsi.c | 202 ++++++++++++++++++++++---------------------- 2 files changed, 101 insertions(+), 102 deletions(-)
Let's hold off on this one until we[1] decide what to do about nsiproxy and potentially include/wine/nsi.h
Huw. [1] The ball's in my court on this.
Hi Huw
yes makes sense
[1] and on Alexandre's too... it's not decided yet which strategy to adopt on unixlib part
A+
On Thu, Mar 03, 2022 at 11:25:02AM +0100, Eric Pouech wrote:
Le 03/03/2022 à 10:58, Huw Davies a écrit : On Wed, Mar 02, 2022 at 09:03:33AM +0100, Eric Pouech wrote: Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/nsi/tests/Makefile.in | 1 dlls/nsi/tests/nsi.c | 202 ++++++++++++++++++++++-- -------------------- 2 files changed, 101 insertions(+), 102 deletions(-) Let's hold off on this one until we[1] decide what to do about nsiproxy and potentially include/wine/nsi.h Huw. [1] The ball's in my court on this.
Hi Huw yes makes sense [1] and on Alexandre's too... it's not decided yet which strategy to adopt on unixlib part
Right, but in this case, since we can change the header file, one solution is to change the DWORDs to unsigned int / UINT32 and then the problem goes away and doesn't require Alexandre to think about it ;-)
Huw.
Le 03/03/2022 à 11:33, Huw Davies a écrit :
On Thu, Mar 03, 2022 at 11:25:02AM +0100, Eric Pouech wrote:
Le 03/03/2022 à 10:58, Huw Davies a écrit : On Wed, Mar 02, 2022 at 09:03:33AM +0100, Eric Pouech wrote: Signed-off-by: Eric Pouecheric.pouech@gmail.com
--- dlls/nsi/tests/Makefile.in | 1 dlls/nsi/tests/nsi.c | 202 ++++++++++++++++++++++-- -------------------- 2 files changed, 101 insertions(+), 102 deletions(-) Let's hold off on this one until we[1] decide what to do about nsiproxy and potentially include/wine/nsi.h Huw. [1] The ball's in my court on this.
Hi Huw yes makes sense [1] and on Alexandre's too... it's not decided yet which strategy to adopt on unixlib part
Right, but in this case, since we can change the header file, one solution is to change the DWORDs to unsigned int / UINT32 and then the problem goes away and doesn't require Alexandre to think about it ;-)
Huw.
yes but
1) we're looking for a solution that could be applied to all unixlib:s
2) in nsiproxy case, it boils down to changing all DWORD -> UINT into, yes, include/wine/nsi.h, but also in most of unixlib code, and also the protocol between the two
just for fun (picking up randomly <g>):
(from dlls/winealsa.drv/unixlib.h)
struct is_format_supported_params { Â Â Â const char *alsa_name; Â Â Â EDataFlow flow; Â Â Â AUDCLNT_SHAREMODE share; Â Â Â const WAVEFORMATEX *fmt_in; Â Â Â WAVEFORMATEXTENSIBLE *fmt_out; Â Â Â HRESULT result; }; most of those internal structures shoulb be converted
doable, but requires lots of changes
A+
On Thu, Mar 03, 2022 at 11:59:24AM +0100, Eric Pouech wrote:
Le 03/03/2022 à 11:33, Huw Davies a écrit : Right, but in this case, since we can change the header file, one solution is to change the DWORDs to unsigned int / UINT32 and then the problem goes away and doesn't require Alexandre to think about it ;-)
Huw.
yes but
- we're looking for a solution that could be applied to all unixlib:s
Sure, I just meant that this one doesn't need to wait for a general solution.
Huw.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ntdsapi/tests/Makefile.in | 1 - dlls/ntdsapi/tests/ntdsapi.c | 38 +++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/dlls/ntdsapi/tests/Makefile.in b/dlls/ntdsapi/tests/Makefile.in index 83373504312..5a895e3b682 100644 --- a/dlls/ntdsapi/tests/Makefile.in +++ b/dlls/ntdsapi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ntdsapi.dll IMPORTS = ntdsapi
diff --git a/dlls/ntdsapi/tests/ntdsapi.c b/dlls/ntdsapi/tests/ntdsapi.c index 77dd675fc97..6bf50ae6b8f 100644 --- a/dlls/ntdsapi/tests/ntdsapi.c +++ b/dlls/ntdsapi/tests/ntdsapi.c @@ -47,41 +47,41 @@ static void test_DsMakeSpn(void)
spn_length = ARRAY_SIZE(spn); ret = DsMakeSpnW(NULL, NULL, NULL, 0, NULL, &spn_length, spn); - ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", ret);
spn_length = ARRAY_SIZE(spn); ret = DsMakeSpnW(NULL, wszServiceHost, NULL, 0, NULL, &spn_length, spn); - ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %ld\n", ret);
spn_length = ARRAY_SIZE(spn); ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 0, NULL, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret); ok(!lstrcmpW(spn, wszSpn1), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn1) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn1) + 1, spn_length); + ok(spn_length == lstrlenW(wszSpn1) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn1) + 1, spn_length);
spn_length = ARRAY_SIZE(spn); ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 0, NULL, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret); ok(!lstrcmpW(spn, wszSpn2), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn2) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn2) + 1, spn_length); + ok(spn_length == lstrlenW(wszSpn2) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn2) + 1, spn_length);
spn_length = ARRAY_SIZE(spn); ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, NULL, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret); ok(!lstrcmpW(spn, wszSpn3), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn3) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn3) + 1, spn_length); + ok(spn_length == lstrlenW(wszSpn3) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn3) + 1, spn_length);
spn_length = ARRAY_SIZE(spn); ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, wszReferrer, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret); ok(!lstrcmpW(spn, wszSpn4), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn4) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn4) + 1, spn_length); + ok(spn_length == lstrlenW(wszSpn4) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn4) + 1, spn_length);
spn_length = ARRAY_SIZE(spn); ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 555, wszReferrer, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); + ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %ld\n", ret); ok(!lstrcmpW(spn, wszSpn5), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn5) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn5) + 1, spn_length); + ok(spn_length == lstrlenW(wszSpn5) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %ld\n", lstrlenW(wszSpn5) + 1, spn_length); }
static void test_DsClientMakeSpnForTargetServer(void) @@ -93,24 +93,24 @@ static void test_DsClientMakeSpnForTargetServer(void) WCHAR buf[256];
ret = DsClientMakeSpnForTargetServerW( NULL, NULL, NULL, NULL ); - ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); + ok( ret == ERROR_INVALID_PARAMETER, "got %lu\n", ret );
ret = DsClientMakeSpnForTargetServerW( classW, NULL, NULL, NULL ); - ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); + ok( ret == ERROR_INVALID_PARAMETER, "got %lu\n", ret );
ret = DsClientMakeSpnForTargetServerW( classW, hostW, NULL, NULL ); - ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret ); + ok( ret == ERROR_INVALID_PARAMETER, "got %lu\n", ret );
len = 0; ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, NULL ); - ok( ret == ERROR_BUFFER_OVERFLOW, "got %u\n", ret ); - ok( len == lstrlenW(resultW) + 1, "got %u\n", len ); + ok( ret == ERROR_BUFFER_OVERFLOW, "got %lu\n", ret ); + ok( len == lstrlenW(resultW) + 1, "got %lu\n", len );
len = ARRAY_SIZE(buf); buf[0] = 0; ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, buf ); - ok( ret == ERROR_SUCCESS, "got %u\n", ret ); - ok( len == lstrlenW(resultW) + 1, "got %u\n", len ); + ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); + ok( len == lstrlenW(resultW) + 1, "got %lu\n", len ); ok( !lstrcmpW( buf, resultW ), "wrong data\n" ); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ntoskrnl.exe/tests/driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver.h b/dlls/ntoskrnl.exe/tests/driver.h index 9126e3cf2bf..34dfdca476c 100644 --- a/dlls/ntoskrnl.exe/tests/driver.h +++ b/dlls/ntoskrnl.exe/tests/driver.h @@ -55,8 +55,8 @@ struct test_data int running_under_wine; int winetest_report_success; int winetest_debug; - int failures; - int todo_failures; + LONG failures; + LONG todo_failures; };
struct main_test_input
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ntoskrnl.exe/tests/Makefile.in | 1 dlls/ntoskrnl.exe/tests/driver.c | 474 ++++++++++++++-------------- dlls/ntoskrnl.exe/tests/driver_netio.c | 160 +++++---- dlls/ntoskrnl.exe/tests/driver_pnp.c | 54 ++- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 542 ++++++++++++++++---------------- dlls/ntoskrnl.exe/tests/utils.h | 2 6 files changed, 616 insertions(+), 617 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/Makefile.in b/dlls/ntoskrnl.exe/tests/Makefile.in index 052a8618a81..ab1db85adbb 100644 --- a/dlls/ntoskrnl.exe/tests/Makefile.in +++ b/dlls/ntoskrnl.exe/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ntoskrnl.exe IMPORTS = advapi32 crypt32 newdev setupapi user32 wintrust ws2_32 hid
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 0364fecab1d..dc4f4ad993d 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -77,7 +77,7 @@ static void *get_proc_address(const char *name)
RtlInitAnsiString(&name_a, name); status = RtlAnsiStringToUnicodeString(&name_u, &name_a, TRUE); - ok (!status, "RtlAnsiStringToUnicodeString failed: %#x\n", status); + ok (!status, "RtlAnsiStringToUnicodeString failed: %#lx\n", status); if (status) return NULL;
ret = MmGetSystemRoutineAddress(&name_u); @@ -295,12 +295,12 @@ static void test_init_funcs(void) KeInitializeTimerEx(&timer, NotificationTimer); ok(timer.Header.Type == 8, "got: %u\n", timer.Header.Type); ok(timer.Header.Size == 0 || timer.Header.Size == 10, "got: %u\n", timer.Header.Size); - ok(timer.Header.SignalState == 0, "got: %u\n", timer.Header.SignalState); + ok(timer.Header.SignalState == 0, "got: %lu\n", timer.Header.SignalState);
KeInitializeTimerEx(&timer2, SynchronizationTimer); ok(timer2.Header.Type == 9, "got: %u\n", timer2.Header.Type); ok(timer2.Header.Size == 0 || timer2.Header.Size == 10, "got: %u\n", timer2.Header.Size); - ok(timer2.Header.SignalState == 0, "got: %u\n", timer2.Header.SignalState); + ok(timer2.Header.SignalState == 0, "got: %lu\n", timer2.Header.SignalState); }
static const WCHAR driver2_path[] = @@ -334,11 +334,11 @@ static void test_load_driver(void) HANDLE file;
ret = PsSetLoadImageNotifyRoutine(test_load_image_notify_routine); - ok(ret == STATUS_SUCCESS, "Got unexpected status %#x.\n", ret); + ok(ret == STATUS_SUCCESS, "Got unexpected status %#lx.\n", ret);
/* Routine gets registered twice on Windows. */ ret = PsSetLoadImageNotifyRoutine(test_load_image_notify_routine); - ok(ret == STATUS_SUCCESS, "Got unexpected status %#x.\n", ret); + ok(ret == STATUS_SUCCESS, "Got unexpected status %#lx.\n", ret);
RtlInitUnicodeString(&image_path, NULL); memset(query_table, 0, sizeof(query_table)); @@ -349,25 +349,25 @@ static void test_load_driver(void) query_table[0].DefaultType = REG_EXPAND_SZ << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT;
ret = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE, driver2_path, query_table, NULL, NULL); - ok(ret == STATUS_SUCCESS, "Got unexpected status %#x.\n", ret); + ok(ret == STATUS_SUCCESS, "Got unexpected status %#lx.\n", ret); ok(!!image_path.Buffer, "image_path.Buffer is NULL.\n");
/* The image path name in the registry may contain NT symlinks (e.g. DOS * drives), which are resolved before the callback is called on Windows 10. */ InitializeObjectAttributes(&attr, &image_path, OBJ_KERNEL_HANDLE, NULL, NULL); ret = ZwOpenFile(&file, SYNCHRONIZE, &attr, &io, 0, FILE_SYNCHRONOUS_IO_NONALERT); - todo_wine ok(!ret, "Got unexpected status %#x.\n", ret); + todo_wine ok(!ret, "Got unexpected status %#lx.\n", ret); if (!ret) { ret = ZwQueryObject(file, ObjectNameInformation, full_name_buffer, sizeof(full_name_buffer), NULL); - ok(!ret, "Got unexpected status %#x.\n", ret); + ok(!ret, "Got unexpected status %#lx.\n", ret); ZwClose(file); }
RtlInitUnicodeString(&name, driver2_path);
ret = ZwLoadDriver(&name); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret);
ok(test_load_image_notify_count == 2, "Got unexpected test_load_image_notify_count %u.\n", test_load_image_notify_count); @@ -382,17 +382,17 @@ static void test_load_driver(void) test_load_image_notify_count = 0;
ret = ZwLoadDriver(&name); - ok(ret == STATUS_IMAGE_ALREADY_LOADED, "got %#x\n", ret); + ok(ret == STATUS_IMAGE_ALREADY_LOADED, "got %#lx\n", ret);
ret = ZwUnloadDriver(&name); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret);
ret = PsRemoveLoadImageNotifyRoutine(test_load_image_notify_routine); - ok(ret == STATUS_SUCCESS, "Got unexpected status %#x.\n", ret); + ok(ret == STATUS_SUCCESS, "Got unexpected status %#lx.\n", ret); ret = PsRemoveLoadImageNotifyRoutine(test_load_image_notify_routine); - ok(ret == STATUS_SUCCESS, "Got unexpected status %#x.\n", ret); + ok(ret == STATUS_SUCCESS, "Got unexpected status %#lx.\n", ret); ret = PsRemoveLoadImageNotifyRoutine(test_load_image_notify_routine); - ok(ret == STATUS_PROCEDURE_NOT_FOUND, "Got unexpected status %#x.\n", ret); + ok(ret == STATUS_PROCEDURE_NOT_FOUND, "Got unexpected status %#lx.\n", ret);
ok(test_load_image_notify_count == 0, "Got unexpected test_load_image_notify_count %u.\n", test_load_image_notify_count); @@ -438,7 +438,7 @@ static void test_current_thread(BOOL is_system) header = (DISPATCHER_HEADER*)current; ok(header->Type == 3, "header->Type != 3, = %u\n", header->Type); ret = wait_single(current, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
if (is_system) ok(current == *pPsInitialSystemProcess, "current != PsInitialSystemProcess\n"); @@ -450,7 +450,7 @@ static void test_current_thread(BOOL is_system)
thread = PsGetCurrentThread(); ret = wait_single( thread, 0 ); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
ok(PsGetThreadId((PETHREAD)KeGetCurrentThread()) == PsGetCurrentThreadId(), "thread IDs don't match\n"); ok(PsIsSystemThread((PETHREAD)KeGetCurrentThread()) == is_system, "unexpected system thread\n"); @@ -461,16 +461,16 @@ static void test_current_thread(BOOL is_system) }
ret = ObOpenObjectByPointer(current, OBJ_KERNEL_HANDLE, NULL, PROCESS_QUERY_INFORMATION, NULL, KernelMode, &process_handle); - ok(!ret, "ObOpenObjectByPointer failed: %#x\n", ret); + ok(!ret, "ObOpenObjectByPointer failed: %#lx\n", ret);
ret = ZwQueryInformationProcess(process_handle, ProcessBasicInformation, &info, sizeof(info), NULL); - ok(!ret, "ZwQueryInformationProcess failed: %#x\n", ret); + ok(!ret, "ZwQueryInformationProcess failed: %#lx\n", ret);
id = PsGetProcessInheritedFromUniqueProcessId(current); ok(id == (HANDLE)info.InheritedFromUniqueProcessId, "unexpected process id %p\n", id);
ret = ZwClose(process_handle); - ok(!ret, "ZwClose failed: %#x\n", ret); + ok(!ret, "ZwClose failed: %#lx\n", ret); }
static void test_critical_region(BOOL is_dispatcher) @@ -517,7 +517,7 @@ static HANDLE create_thread(PKSTART_ROUTINE proc, void *arg) attr.Length = sizeof(attr); attr.Attributes = OBJ_KERNEL_HANDLE; ret = PsCreateSystemThread(&thread, THREAD_ALL_ACCESS, &attr, NULL, NULL, proc, arg); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret);
return thread; } @@ -527,9 +527,9 @@ static void join_thread(HANDLE thread) NTSTATUS ret;
ret = ZwWaitForSingleObject(thread, FALSE, NULL); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret); ret = ZwClose(thread); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret); }
static void run_thread(PKSTART_ROUTINE proc, void *arg) @@ -545,7 +545,7 @@ static void WINAPI mutex_thread(void *arg) NTSTATUS ret, expect = (NTSTATUS)(DWORD_PTR)arg;
ret = wait_single(&test_mutex, 0); - ok(ret == expect, "expected %#x, got %#x\n", expect, ret); + ok(ret == expect, "expected %#lx, got %#lx\n", expect, ret);
if (!ret) KeReleaseMutex(&test_mutex, FALSE); PsTerminateSystemThread(STATUS_SUCCESS); @@ -559,7 +559,7 @@ static void WINAPI remove_lock_thread(void *arg) NTSTATUS ret;
ret = IoAcquireRemoveLockEx(lock, NULL, "", 1, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret); KeSetEvent(&remove_lock_ready, 0, FALSE);
IoReleaseRemoveLockAndWaitEx(lock, NULL, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); @@ -597,86 +597,86 @@ static void test_sync(void) KeInitializeEvent(&manual_event, NotificationEvent, FALSE);
ret = wait_single(&manual_event, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
ret = KeReadStateEvent(&manual_event); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
KeSetEvent(&manual_event, 0, FALSE);
ret = KeReadStateEvent(&manual_event); - ok(ret == 1, "got %d\n", ret); + ok(ret == 1, "got %ld\n", ret);
ret = wait_single(&manual_event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_single(&manual_event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
KeResetEvent(&manual_event);
ret = wait_single(&manual_event, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeInitializeEvent(&auto_event, SynchronizationEvent, FALSE);
ret = wait_single(&auto_event, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeSetEvent(&auto_event, 0, FALSE);
ret = wait_single(&auto_event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_single(&auto_event, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeInitializeEvent(&auto_event, SynchronizationEvent, TRUE);
ret = wait_single(&auto_event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
objs[0] = &manual_event; objs[1] = &auto_event;
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeSetEvent(&manual_event, 0, FALSE); KeSetEvent(&auto_event, 0, FALSE);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_single(&auto_event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
KeResetEvent(&manual_event); KeSetEvent(&auto_event, 0, FALSE);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == 1, "got %#x\n", ret); + ok(ret == 1, "got %#lx\n", ret);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeSetEvent(&manual_event, 0, FALSE); KeSetEvent(&auto_event, 0, FALSE);
ret = wait_multiple(2, objs, WaitAll, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_multiple(2, objs, WaitAll, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeSetEvent(&auto_event, 0, FALSE); KeResetEvent(&manual_event);
ret = wait_multiple(2, objs, WaitAll, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
ret = wait_single(&auto_event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
objs[0] = &auto_event; objs[1] = &manual_event; @@ -684,39 +684,39 @@ static void test_sync(void) KeSetEvent(&auto_event, 0, FALSE);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == 1, "got %#x\n", ret); + ok(ret == 1, "got %#lx\n", ret);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == 1, "got %#x\n", ret); + ok(ret == 1, "got %#lx\n", ret);
InitializeObjectAttributes(&attr, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); ret = ZwCreateEvent(&handle, SYNCHRONIZE, &attr, NotificationEvent, TRUE); - ok(!ret, "ZwCreateEvent failed: %#x\n", ret); + ok(!ret, "ZwCreateEvent failed: %#lx\n", ret);
ret = ObReferenceObjectByHandle(handle, SYNCHRONIZE, *pExEventObjectType, KernelMode, (void **)&event, NULL); - ok(!ret, "ObReferenceObjectByHandle failed: %#x\n", ret); + ok(!ret, "ObReferenceObjectByHandle failed: %#lx\n", ret);
ret = wait_single(event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); ret = KeReadStateEvent(event); - ok(ret == 1, "got %d\n", ret); + ok(ret == 1, "got %ld\n", ret); KeResetEvent(event); ret = KeReadStateEvent(event); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); ret = wait_single(event, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret); ret = wait_single_handle(handle, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeSetEvent(event, 0, FALSE); ret = wait_single(event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); ret = wait_single_handle(handle, 0); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret);
ZwClose(handle); ObDereferenceObject(event); @@ -725,90 +725,90 @@ static void test_sync(void) ok(event != NULL, "IoCreateSynchronizationEvent failed\n");
ret = wait_single(event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); KeResetEvent(event); ret = wait_single(event, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret); ret = wait_single_handle(handle, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
ret = ZwSetEvent(handle, NULL); - ok(!ret, "NtSetEvent returned %#x\n", ret); + ok(!ret, "NtSetEvent returned %#lx\n", ret); ret = wait_single(event, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); ret = wait_single_handle(handle, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeSetEvent(event, 0, FALSE); ret = wait_single_handle(handle, 0); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret); ret = wait_single(event, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
ret = ZwClose(handle); - ok(!ret, "ZwClose returned %#x\n", ret); + ok(!ret, "ZwClose returned %#lx\n", ret);
/* test semaphores */ KeInitializeSemaphore(&semaphore, 0, 5);
ret = wait_single(&semaphore, 0); - ok(ret == STATUS_TIMEOUT, "got %u\n", ret); + ok(ret == STATUS_TIMEOUT, "got %lu\n", ret);
ret = KeReleaseSemaphore(&semaphore, 0, 1, FALSE); - ok(ret == 0, "got prev %d\n", ret); + ok(ret == 0, "got prev %ld\n", ret);
ret = KeReleaseSemaphore(&semaphore, 0, 2, FALSE); - ok(ret == 1, "got prev %d\n", ret); + ok(ret == 1, "got prev %ld\n", ret);
ret = KeReleaseSemaphore(&semaphore, 0, 1, FALSE); - ok(ret == 3, "got prev %d\n", ret); + ok(ret == 3, "got prev %ld\n", ret);
for (i = 0; i < 4; i++) { ret = wait_single(&semaphore, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); }
ret = wait_single(&semaphore, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeInitializeSemaphore(&semaphore2, 3, 5);
ret = KeReleaseSemaphore(&semaphore2, 0, 1, FALSE); - ok(ret == 3, "got prev %d\n", ret); + ok(ret == 3, "got prev %ld\n", ret);
for (i = 0; i < 4; i++) { ret = wait_single(&semaphore2, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); }
objs[0] = &semaphore; objs[1] = &semaphore2;
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeReleaseSemaphore(&semaphore, 0, 1, FALSE); KeReleaseSemaphore(&semaphore2, 0, 1, FALSE);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == 1, "got %#x\n", ret); + ok(ret == 1, "got %#lx\n", ret);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
KeReleaseSemaphore(&semaphore, 0, 1, FALSE); KeReleaseSemaphore(&semaphore2, 0, 1, FALSE);
ret = wait_multiple(2, objs, WaitAll, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_multiple(2, objs, WaitAny, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
/* test mutexes */ KeInitializeMutex(&test_mutex, 0); @@ -816,24 +816,24 @@ static void test_sync(void) for (i = 0; i < 10; i++) { ret = wait_single(&test_mutex, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); }
for (i = 0; i < 10; i++) { ret = KeReleaseMutex(&test_mutex, FALSE); - ok(ret == i - 9, "expected %d, got %d\n", i - 9, ret); + ok(ret == i - 9, "expected %d, got %ld\n", i - 9, ret); }
run_thread(mutex_thread, (void *)0);
ret = wait_single(&test_mutex, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
run_thread(mutex_thread, (void *)STATUS_TIMEOUT);
ret = KeReleaseMutex(&test_mutex, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
run_thread(mutex_thread, (void *)0);
@@ -844,13 +844,13 @@ static void test_sync(void) KeSetTimerEx(&timer, timeout, 0, NULL);
ret = wait_single(&timer, 0); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret);
ret = wait_single(&timer, -40 * 10000); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_single(&timer, 0); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
KeCancelTimer(&timer); KeInitializeTimerEx(&timer, SynchronizationTimer); @@ -861,36 +861,36 @@ static void test_sync(void) KeSetTimerEx(&timer, timeout, 0, &dpc);
ret = wait_single(&timer, 0); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret); ok(!dpc_context.called, "DPC was called unexpectedly.\n");
ret = wait_single(&timer, -40 * 10000); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); sleep_1ms(); ok(dpc_context.called, "DPC was not called.\n");
ret = wait_single(&timer, -40 * 10000); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret);
KeCancelTimer(&timer); KeSetTimerEx(&timer, timeout, 20, NULL);
ret = wait_single(&timer, 0); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret);
ret = wait_single(&timer, -40 * 10000); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_single(&timer, 0); /* aliasing makes it sometimes succeeds, try again in that case */ if (ret == 0) ret = wait_single(&timer, 0); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret);
ret = wait_single(&timer, -40 * 10000); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_single(&timer, -40 * 10000); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
KeCancelTimer(&timer);
@@ -899,31 +899,31 @@ static void test_sync(void) KeSetTimerEx(&timer, timeout, 0, &dpc);
ret = wait_single(&timer, 0); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret); ok(!dpc_context.called, "DPC was called.\n");
KeCancelTimer(&timer); dpc_context.called = 0; ret = wait_single(&timer, -40 * 10000); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret); ok(!dpc_context.called, "DPC was called.\n");
KeSetTimerEx(&timer, timeout, 20, &dpc); KeSetTimerEx(&timer, timeout, 0, &dpc); ret = wait_single(&timer, 0); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret);
ret = wait_single(&timer, -40 * 10000); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = wait_single(&timer, 0); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret);
ret = wait_single(&timer, -40 * 10000); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret);
ret = wait_single(&timer, -40 * 10000); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret);
KeCancelTimer(&timer); /* Test reinitializing timer. */ @@ -931,19 +931,19 @@ static void test_sync(void) KeInitializeTimerEx(&timer, SynchronizationTimer); dpc_context.called = 0; ret = wait_single(&timer, -40 * 10000); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); sleep_1ms(); todo_wine ok(dpc_context.called, "DPC was not called.\n");
ret = wait_single(&timer, 0); - ok(ret == WAIT_TIMEOUT, "got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret); sleep_1ms(); todo_wine ok(dpc_context.called, "DPC was not called.\n");
dpc_context.called = 0; KeSetTimerEx(&timer, timeout, 0, &dpc); ret = wait_single(&timer, -40 * 10000); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret); sleep_1ms(); ok(dpc_context.called, "DPC was not called.\n");
@@ -953,36 +953,36 @@ static void test_sync(void) IoInitializeRemoveLockEx(&remove_lock, wine_tag, 0, 0, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK));
ret = IoAcquireRemoveLockEx(&remove_lock, NULL, "", 1, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
IoReleaseRemoveLockEx(&remove_lock, NULL, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK));
ret = IoAcquireRemoveLockEx(&remove_lock, NULL, "", 1, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = IoAcquireRemoveLockEx(&remove_lock, NULL, "", 1, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
KeInitializeEvent(&remove_lock_ready, SynchronizationEvent, FALSE); thread = create_thread(remove_lock_thread, &remove_lock); ret = wait_single(&remove_lock_ready, -1000 * 10000); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret); ret = wait_single_handle(thread, -50 * 10000); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
ret = IoAcquireRemoveLockEx(&remove_lock, NULL, "", 1, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); - ok(ret == STATUS_DELETE_PENDING, "got %#x\n", ret); + ok(ret == STATUS_DELETE_PENDING, "got %#lx\n", ret);
IoReleaseRemoveLockEx(&remove_lock, NULL, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); ret = wait_single_handle(thread, 0); - ok(ret == STATUS_TIMEOUT, "got %#x\n", ret); + ok(ret == STATUS_TIMEOUT, "got %#lx\n", ret);
IoReleaseRemoveLockEx(&remove_lock, NULL, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); ret = wait_single_handle(thread, -10000 * 10000); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = IoAcquireRemoveLockEx(&remove_lock, NULL, "", 1, sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)); - ok(ret == STATUS_DELETE_PENDING, "got %#x\n", ret); + ok(ret == STATUS_DELETE_PENDING, "got %#lx\n", ret); }
static void test_call_driver(DEVICE_OBJECT *device) @@ -1003,9 +1003,9 @@ static void test_call_driver(DEVICE_OBJECT *device) ok(irp->CurrentLocation == 2, "CurrentLocation = %u\n", irp->CurrentLocation); ok(irp->Tail.Overlay.Thread == (PETHREAD)KeGetCurrentThread(), "IRP thread is not the current thread\n"); - ok(!irp->IoStatus.Status, "got status %#x\n", irp->IoStatus.Status); + ok(!irp->IoStatus.Status, "got status %#lx\n", irp->IoStatus.Status); ok(!irp->IoStatus.Information, "got information %#I64x\n", (UINT64)irp->IoStatus.Information); - ok(iosb.Status == 0xdeadbeef, "got status %#x\n", iosb.Status); + ok(iosb.Status == 0xdeadbeef, "got status %#lx\n", iosb.Status); ok(iosb.Information == 0xdeadbeef, "got information %#I64x\n", (UINT64)iosb.Information);
irpsp = IoGetNextIrpStackLocation(irp); @@ -1015,16 +1015,16 @@ static void test_call_driver(DEVICE_OBJECT *device) ok(!irpsp->CompletionRoutine, "CompletionRoutine = %p\n", irpsp->CompletionRoutine);
status = IoCallDriver(device, irp); - ok(status == STATUS_PENDING, "IoCallDriver returned %#x\n", status); - ok(!irp->IoStatus.Status, "got status %#x\n", irp->IoStatus.Status); + ok(status == STATUS_PENDING, "IoCallDriver returned %#lx\n", status); + ok(!irp->IoStatus.Status, "got status %#lx\n", irp->IoStatus.Status); ok(!irp->IoStatus.Information, "got information %#I64x\n", (UINT64)irp->IoStatus.Information); - ok(iosb.Status == 0xdeadbeef, "got status %#x\n", iosb.Status); + ok(iosb.Status == 0xdeadbeef, "got status %#lx\n", iosb.Status); ok(iosb.Information == 0xdeadbeef, "got information %#I64x\n", (UINT64)iosb.Information);
irp->IoStatus.Status = STATUS_SUCCESS; irp->IoStatus.Information = 123; IoCompleteRequest(irp, IO_NO_INCREMENT); - ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status); + ok(iosb.Status == STATUS_SUCCESS, "got status %#lx\n", iosb.Status); ok(iosb.Information == 123, "got information %#I64x\n", (UINT64)iosb.Information);
KeInitializeEvent(&event, NotificationEvent, FALSE); @@ -1045,20 +1045,20 @@ static void test_call_driver(DEVICE_OBJECT *device) ok(!irpsp->CompletionRoutine, "CompletionRoutine = %p\n", irpsp->CompletionRoutine);
status = wait_single(&event, 0); - ok(status == STATUS_TIMEOUT, "got %#x\n", status); + ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
status = IoCallDriver(device, irp); - ok(status == STATUS_PENDING, "IoCallDriver returned %#x\n", status); + ok(status == STATUS_PENDING, "IoCallDriver returned %#lx\n", status);
status = wait_single(&event, 0); - ok(status == STATUS_TIMEOUT, "got %#x\n", status); + ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
irp->IoStatus.Status = STATUS_SUCCESS; irp->IoStatus.Information = 0; IoCompleteRequest(irp, IO_NO_INCREMENT);
status = wait_single(&event, 0); - ok(status == STATUS_SUCCESS, "got %#x\n", status); + ok(status == STATUS_SUCCESS, "got %#lx\n", status); }
static int cancel_cnt; @@ -1113,7 +1113,7 @@ static void test_cancel_irp(DEVICE_OBJECT *device)
/* cancel IRP with cancel routine */ status = IoCallDriver(device, irp); - ok(status == STATUS_PENDING, "IoCallDriver returned %#x\n", status); + ok(status == STATUS_PENDING, "IoCallDriver returned %#lx\n", status);
ok(irp->CurrentLocation == 1, "CurrentLocation = %u\n", irp->CurrentLocation); irpsp = IoGetCurrentIrpStackLocation(irp); @@ -1139,7 +1139,7 @@ static void test_cancel_irp(DEVICE_OBJECT *device) IoSetCompletionRoutine(irp, cancel_test_completion, &completion_called, TRUE, FALSE, TRUE);
status = IoCallDriver(device, irp); - ok(status == STATUS_PENDING, "IoCallDriver returned %#x\n", status); + ok(status == STATUS_PENDING, "IoCallDriver returned %#lx\n", status);
IoSetCancelRoutine(irp, cancel_irp); cancel_cnt = 0; @@ -1157,7 +1157,7 @@ static void test_cancel_irp(DEVICE_OBJECT *device) IoSetCompletionRoutine(irp, cancel_test_completion, &completion_called, TRUE, TRUE, FALSE);
status = IoCallDriver(device, irp); - ok(status == STATUS_PENDING, "IoCallDriver returned %#x\n", status); + ok(status == STATUS_PENDING, "IoCallDriver returned %#lx\n", status);
IoSetCancelRoutine(irp, cancel_irp); cancel_cnt = 0; @@ -1175,7 +1175,7 @@ static void test_cancel_irp(DEVICE_OBJECT *device) IoSetCompletionRoutine(irp, cancel_test_completion, &completion_called, TRUE, FALSE, FALSE);
status = IoCallDriver(device, irp); - ok(status == STATUS_PENDING, "IoCallDriver returned %#x\n", status); + ok(status == STATUS_PENDING, "IoCallDriver returned %#lx\n", status);
IoSetCancelRoutine(irp, cancel_irp); cancel_cnt = 0; @@ -1208,7 +1208,7 @@ static void test_stack_callout(void) { callout_cnt = 0; ret = pKeExpandKernelStackAndCallout(callout, (void*)0xdeadbeef, 4096); - ok(ret == STATUS_SUCCESS, "KeExpandKernelStackAndCallout failed: %#x\n", ret); + ok(ret == STATUS_SUCCESS, "KeExpandKernelStackAndCallout failed: %#lx\n", ret); ok(callout_cnt == 1, "callout_cnt = %u\n", callout_cnt); } else win_skip("KeExpandKernelStackAndCallout is not available\n"); @@ -1218,7 +1218,7 @@ static void test_stack_callout(void) { callout_cnt = 0; ret = pKeExpandKernelStackAndCalloutEx(callout, (void*)0xdeadbeef, 4096, FALSE, NULL); - ok(ret == STATUS_SUCCESS, "KeExpandKernelStackAndCalloutEx failed: %#x\n", ret); + ok(ret == STATUS_SUCCESS, "KeExpandKernelStackAndCalloutEx failed: %#lx\n", ret); ok(callout_cnt == 1, "callout_cnt = %u\n", callout_cnt); } else win_skip("KeExpandKernelStackAndCalloutEx is not available\n"); @@ -1233,17 +1233,17 @@ static void test_lookaside_list(void) ExInitializeNPagedLookasideList(&list, NULL, NULL, POOL_NX_ALLOCATION, LOOKASIDE_MINIMUM_BLOCK_SIZE, tag, 0); ok(list.L.Depth == 4, "Expected 4 got %u\n", list.L.Depth); ok(list.L.MaximumDepth == 256, "Expected 256 got %u\n", list.L.MaximumDepth); - ok(list.L.TotalAllocates == 0, "Expected 0 got %u\n", list.L.TotalAllocates); - ok(list.L.AllocateMisses == 0, "Expected 0 got %u\n", list.L.AllocateMisses); - ok(list.L.TotalFrees == 0, "Expected 0 got %u\n", list.L.TotalFrees); - ok(list.L.FreeMisses == 0, "Expected 0 got %u\n", list.L.FreeMisses); + ok(list.L.TotalAllocates == 0, "Expected 0 got %lu\n", list.L.TotalAllocates); + ok(list.L.AllocateMisses == 0, "Expected 0 got %lu\n", list.L.AllocateMisses); + ok(list.L.TotalFrees == 0, "Expected 0 got %lu\n", list.L.TotalFrees); + ok(list.L.FreeMisses == 0, "Expected 0 got %lu\n", list.L.FreeMisses); ok(list.L.Type == (NonPagedPool|POOL_NX_ALLOCATION), "Expected NonPagedPool|POOL_NX_ALLOCATION got %u\n", list.L.Type); - ok(list.L.Tag == tag, "Expected %x got %x\n", tag, list.L.Tag); + ok(list.L.Tag == tag, "Expected %lx got %lx\n", tag, list.L.Tag); ok(list.L.Size == LOOKASIDE_MINIMUM_BLOCK_SIZE, - "Expected %u got %u\n", LOOKASIDE_MINIMUM_BLOCK_SIZE, list.L.Size); - ok(list.L.LastTotalAllocates == 0,"Expected 0 got %u\n", list.L.LastTotalAllocates); - ok(list.L.LastAllocateMisses == 0,"Expected 0 got %u\n", list.L.LastAllocateMisses); + "Expected %Iu got %lu\n", LOOKASIDE_MINIMUM_BLOCK_SIZE, list.L.Size); + ok(list.L.LastTotalAllocates == 0,"Expected 0 got %lu\n", list.L.LastTotalAllocates); + ok(list.L.LastAllocateMisses == 0,"Expected 0 got %lu\n", list.L.LastAllocateMisses); ExDeleteNPagedLookasideList(&list);
list.L.Depth = 0; @@ -1256,17 +1256,17 @@ static void test_lookaside_list(void) ExInitializePagedLookasideList(&paged_list, NULL, NULL, POOL_NX_ALLOCATION, LOOKASIDE_MINIMUM_BLOCK_SIZE, tag, 0); ok(paged_list.L.Depth == 4, "Expected 4 got %u\n", paged_list.L.Depth); ok(paged_list.L.MaximumDepth == 256, "Expected 256 got %u\n", paged_list.L.MaximumDepth); - ok(paged_list.L.TotalAllocates == 0, "Expected 0 got %u\n", paged_list.L.TotalAllocates); - ok(paged_list.L.AllocateMisses == 0, "Expected 0 got %u\n", paged_list.L.AllocateMisses); - ok(paged_list.L.TotalFrees == 0, "Expected 0 got %u\n", paged_list.L.TotalFrees); - ok(paged_list.L.FreeMisses == 0, "Expected 0 got %u\n", paged_list.L.FreeMisses); + ok(paged_list.L.TotalAllocates == 0, "Expected 0 got %lu\n", paged_list.L.TotalAllocates); + ok(paged_list.L.AllocateMisses == 0, "Expected 0 got %lu\n", paged_list.L.AllocateMisses); + ok(paged_list.L.TotalFrees == 0, "Expected 0 got %lu\n", paged_list.L.TotalFrees); + ok(paged_list.L.FreeMisses == 0, "Expected 0 got %lu\n", paged_list.L.FreeMisses); ok(paged_list.L.Type == (PagedPool|POOL_NX_ALLOCATION), "Expected PagedPool|POOL_NX_ALLOCATION got %u\n", paged_list.L.Type); - ok(paged_list.L.Tag == tag, "Expected %x got %x\n", tag, paged_list.L.Tag); + ok(paged_list.L.Tag == tag, "Expected %lx got %lx\n", tag, paged_list.L.Tag); ok(paged_list.L.Size == LOOKASIDE_MINIMUM_BLOCK_SIZE, - "Expected %u got %u\n", LOOKASIDE_MINIMUM_BLOCK_SIZE, paged_list.L.Size); - ok(paged_list.L.LastTotalAllocates == 0,"Expected 0 got %u\n", paged_list.L.LastTotalAllocates); - ok(paged_list.L.LastAllocateMisses == 0,"Expected 0 got %u\n", paged_list.L.LastAllocateMisses); + "Expected %Iu got %lu\n", LOOKASIDE_MINIMUM_BLOCK_SIZE, paged_list.L.Size); + ok(paged_list.L.LastTotalAllocates == 0,"Expected 0 got %lu\n", paged_list.L.LastTotalAllocates); + ok(paged_list.L.LastAllocateMisses == 0,"Expected 0 got %lu\n", paged_list.L.LastAllocateMisses); ExDeletePagedLookasideList(&paged_list);
paged_list.L.Depth = 0; @@ -1286,7 +1286,7 @@ static void test_version(void) ok(!!pNtBuildNumber, "Could not get pointer to NtBuildNumber\n");
PsGetVersion(NULL, NULL, &build, NULL); - ok(*pNtBuildNumber == build, "Expected build number %u, got %u\n", build, *pNtBuildNumber); + ok(*pNtBuildNumber == build, "Expected build number %lu, got %u\n", build, *pNtBuildNumber); }
static void WINAPI thread_proc(void *arg) @@ -1313,31 +1313,31 @@ static void test_ob_reference(void)
InitializeObjectAttributes(&attr, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); status = ZwCreateEvent(&event_handle, SYNCHRONIZE, &attr, NotificationEvent, TRUE); - ok(!status, "ZwCreateEvent failed: %#x\n", status); + ok(!status, "ZwCreateEvent failed: %#lx\n", status);
RtlInitUnicodeString(&pathU, L"\??\C:\windows\winetest_ntoskrnl_file.tmp"); attr.ObjectName = &pathU; attr.Attributes = OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE; status = ZwCreateFile(&file_handle, DELETE | FILE_WRITE_DATA | SYNCHRONIZE, &attr, &io, NULL, 0, 0, FILE_CREATE, FILE_DELETE_ON_CLOSE | FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0); - ok(!status, "ZwCreateFile failed: %#x\n", status); + ok(!status, "ZwCreateFile failed: %#lx\n", status);
status = ZwDuplicateObject(NtCurrentProcess(), file_handle, NtCurrentProcess(), &file_handle2, 0, OBJ_KERNEL_HANDLE, DUPLICATE_SAME_ACCESS); - ok(!status, "ZwDuplicateObject failed: %#x\n", status); + ok(!status, "ZwDuplicateObject failed: %#lx\n", status);
InitializeObjectAttributes(&attr, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); status = PsCreateSystemThread(&thread_handle, SYNCHRONIZE, &attr, NULL, NULL, thread_proc, NULL); - ok(!status, "PsCreateSystemThread returned: %#x\n", status); + ok(!status, "PsCreateSystemThread returned: %#lx\n", status);
status = ObReferenceObjectByHandle(NULL, SYNCHRONIZE, *pExEventObjectType, KernelMode, &obj1, NULL); - ok(status == STATUS_INVALID_HANDLE, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(status == STATUS_INVALID_HANDLE, "ObReferenceObjectByHandle failed: %#lx\n", status);
status = ObReferenceObjectByHandle(event_handle, SYNCHRONIZE, *pIoFileObjectType, KernelMode, &obj1, NULL); - ok(status == STATUS_OBJECT_TYPE_MISMATCH, "ObReferenceObjectByHandle returned: %#x\n", status); + ok(status == STATUS_OBJECT_TYPE_MISMATCH, "ObReferenceObjectByHandle returned: %#lx\n", status);
status = ObReferenceObjectByHandle(event_handle, SYNCHRONIZE, NULL, KernelMode, &obj1, NULL); - ok(!status, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(!status, "ObReferenceObjectByHandle failed: %#lx\n", status);
if (pObGetObjectType) { @@ -1352,26 +1352,26 @@ static void test_ob_reference(void) }
status = ObReferenceObjectByHandle(event_handle, SYNCHRONIZE, *pIoFileObjectType, KernelMode, &obj2, NULL); - ok(status == STATUS_OBJECT_TYPE_MISMATCH, "ObReferenceObjectByHandle returned: %#x\n", status); + ok(status == STATUS_OBJECT_TYPE_MISMATCH, "ObReferenceObjectByHandle returned: %#lx\n", status);
status = ObReferenceObjectByHandle(event_handle, SYNCHRONIZE, *pExEventObjectType, KernelMode, &obj2, NULL); - ok(!status, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(!status, "ObReferenceObjectByHandle failed: %#lx\n", status); ok(obj1 == obj2, "obj1 != obj2\n");
ObDereferenceObject(obj2);
status = ObReferenceObjectByHandle(event_handle, SYNCHRONIZE, NULL, KernelMode, &obj2, NULL); - ok(!status, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(!status, "ObReferenceObjectByHandle failed: %#lx\n", status); ok(obj1 == obj2, "obj1 != obj2\n");
ObDereferenceObject(obj2); ObDereferenceObject(obj1);
status = ObReferenceObjectByHandle(file_handle, SYNCHRONIZE, *pIoFileObjectType, KernelMode, &obj1, NULL); - ok(!status, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(!status, "ObReferenceObjectByHandle failed: %#lx\n", status);
status = ObReferenceObjectByHandle(file_handle2, SYNCHRONIZE, *pIoFileObjectType, KernelMode, &obj2, NULL); - ok(!status, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(!status, "ObReferenceObjectByHandle failed: %#lx\n", status); ok(obj1 == obj2, "obj1 != obj2\n");
file = obj1; @@ -1381,47 +1381,47 @@ static void test_ob_reference(void) ObDereferenceObject(obj2);
status = ObReferenceObjectByHandle(thread_handle, SYNCHRONIZE, *pPsThreadType, KernelMode, &obj1, NULL); - ok(!status, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(!status, "ObReferenceObjectByHandle failed: %#lx\n", status);
status = ObReferenceObjectByHandle(thread_handle, SYNCHRONIZE, *pPsThreadType, KernelMode, &obj2, NULL); - ok(!status, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(!status, "ObReferenceObjectByHandle failed: %#lx\n", status); ok(obj1 == obj2, "obj1 != obj2\n");
header = obj1; ok(header->Type == 6, "Type = %u\n", header->Type);
status = wait_single(header, 0); - ok(status == 0 || status == STATUS_TIMEOUT, "got %#x\n", status); + ok(status == 0 || status == STATUS_TIMEOUT, "got %#lx\n", status);
ObDereferenceObject(obj2);
status = ObOpenObjectByPointer(obj1, OBJ_KERNEL_HANDLE, NULL, 0, NULL, KernelMode, &handle); - ok(status == STATUS_SUCCESS, "ObOpenObjectByPointer failed: %#x\n", status); + ok(status == STATUS_SUCCESS, "ObOpenObjectByPointer failed: %#lx\n", status);
status = ZwClose(handle); - ok(!status, "ZwClose failed: %#x\n", status); + ok(!status, "ZwClose failed: %#lx\n", status);
status = ObReferenceObjectByHandle(thread_handle, SYNCHRONIZE, *pPsThreadType, KernelMode, &obj2, NULL); - ok(!status, "ObReferenceObjectByHandle failed: %#x\n", status); + ok(!status, "ObReferenceObjectByHandle failed: %#lx\n", status); ok(obj1 == obj2, "obj1 != obj2\n"); ObDereferenceObject(obj2);
status = ObOpenObjectByPointer(obj1, OBJ_KERNEL_HANDLE, NULL, 0, *pIoFileObjectType, KernelMode, &handle); - ok(status == STATUS_OBJECT_TYPE_MISMATCH, "ObOpenObjectByPointer returned: %#x\n", status); + ok(status == STATUS_OBJECT_TYPE_MISMATCH, "ObOpenObjectByPointer returned: %#lx\n", status);
ObDereferenceObject(obj1);
status = ZwClose(thread_handle); - ok(!status, "ZwClose failed: %#x\n", status); + ok(!status, "ZwClose failed: %#lx\n", status);
status = ZwClose(event_handle); - ok(!status, "ZwClose failed: %#x\n", status); + ok(!status, "ZwClose failed: %#lx\n", status);
status = ZwClose(file_handle); - ok(!status, "ZwClose failed: %#x\n", status); + ok(!status, "ZwClose failed: %#lx\n", status);
status = ZwClose(file_handle2); - ok(!status, "ZwClose failed: %#x\n", status); + ok(!status, "ZwClose failed: %#lx\n", status); }
static void check_resource_(int line, ERESOURCE *resource, ULONG exclusive_waiters, @@ -1432,16 +1432,16 @@ static void check_resource_(int line, ERESOURCE *resource, ULONG exclusive_waite
count = ExGetExclusiveWaiterCount(resource); ok_(__FILE__, line)(count == exclusive_waiters, - "expected %u exclusive waiters, got %u\n", exclusive_waiters, count); + "expected %lu exclusive waiters, got %lu\n", exclusive_waiters, count); count = ExGetSharedWaiterCount(resource); ok_(__FILE__, line)(count == shared_waiters, - "expected %u shared waiters, got %u\n", shared_waiters, count); + "expected %lu shared waiters, got %lu\n", shared_waiters, count); ret = ExIsResourceAcquiredExclusiveLite(resource); ok_(__FILE__, line)(ret == exclusive, "expected exclusive %u, got %u\n", exclusive, ret); count = ExIsResourceAcquiredSharedLite(resource); ok_(__FILE__, line)(count == shared_count, - "expected shared %u, got %u\n", shared_count, count); + "expected shared %lu, got %lu\n", shared_count, count); } #define check_resource(a,b,c,d,e) check_resource_(__LINE__,a,b,c,d,e)
@@ -1497,7 +1497,7 @@ static void test_resource(void) memset(&resource, 0xcc, sizeof(resource));
status = ExInitializeResourceLite(&resource); - ok(status == STATUS_SUCCESS, "got status %#x\n", status); + ok(status == STATUS_SUCCESS, "got status %#lx\n", status); check_resource(&resource, 0, 0, FALSE, 0);
KeEnterCriticalRegion(); @@ -1709,7 +1709,7 @@ static void test_resource(void) KeLeaveCriticalRegion();
status = ExDeleteResourceLite(&resource); - ok(status == STATUS_SUCCESS, "got status %#x\n", status); + ok(status == STATUS_SUCCESS, "got status %#lx\n", status); }
static void test_lookup_thread(void) @@ -1718,13 +1718,13 @@ static void test_lookup_thread(void) PETHREAD thread = NULL;
status = PsLookupThreadByThreadId(PsGetCurrentThreadId(), &thread); - ok(!status, "PsLookupThreadByThreadId failed: %#x\n", status); + ok(!status, "PsLookupThreadByThreadId failed: %#lx\n", status); ok((PKTHREAD)thread == KeGetCurrentThread(), "thread != KeGetCurrentThread\n"); if (thread) ObDereferenceObject(thread);
status = PsLookupThreadByThreadId(NULL, &thread); ok(status == STATUS_INVALID_CID || broken(status == STATUS_INVALID_PARAMETER) /* winxp */, - "PsLookupThreadByThreadId returned %#x\n", status); + "PsLookupThreadByThreadId returned %#lx\n", status); }
static void test_stack_limits(void) @@ -1792,7 +1792,7 @@ static void test_completion(void) NULL, 0, NULL, 0, FALSE, &event, &io); IoSetCompletionRoutine(irp, completion_cb, NULL, TRUE, TRUE, TRUE); ret = IoCallDriver(upper_device, irp); - ok(ret == STATUS_SUCCESS, "IoCallDriver returned %#x\n", ret); + ok(ret == STATUS_SUCCESS, "IoCallDriver returned %#lx\n", ret); ok(got_completion == 2, "got %u calls to completion routine\n", got_completion);
completion_lower_pending = TRUE; @@ -1802,7 +1802,7 @@ static void test_completion(void) NULL, 0, NULL, 0, FALSE, &event, &io); IoSetCompletionRoutine(irp, completion_cb, NULL, TRUE, TRUE, TRUE); ret = IoCallDriver(upper_device, irp); - ok(ret == STATUS_PENDING, "IoCallDriver returned %#x\n", ret); + ok(ret == STATUS_PENDING, "IoCallDriver returned %#lx\n", ret); ok(!got_completion, "got %u calls to completion routine\n", got_completion);
ok(irp->CurrentLocation == 1, "Got current location %u.\n", irp->CurrentLocation); @@ -1819,7 +1819,7 @@ static void test_completion(void) NULL, 0, NULL, 0, FALSE, &event, &io); IoSetCompletionRoutine(irp, completion_cb, NULL, TRUE, TRUE, TRUE); ret = IoCallDriver(upper_device, irp); - ok(ret == STATUS_PENDING, "IoCallDriver returned %#x\n", ret); + ok(ret == STATUS_PENDING, "IoCallDriver returned %#lx\n", ret); ok(!got_completion, "got %u calls to completion routine\n", got_completion);
ok(irp->CurrentLocation == 1, "Got current location %u.\n", irp->CurrentLocation); @@ -1898,14 +1898,14 @@ static void test_object_name(void)
ret_size = 0; ret = ObQueryNameString(lower_device, name, 0, &ret_size); - ok(ret == STATUS_INFO_LENGTH_MISMATCH, "got status %#x\n", ret); - ok(ret_size == sizeof(*name) + sizeof(device_nameW), "got size %u\n", ret_size); + ok(ret == STATUS_INFO_LENGTH_MISMATCH, "got status %#lx\n", ret); + ok(ret_size == sizeof(*name) + sizeof(device_nameW), "got size %lu\n", ret_size);
ret_size = 0; ret = ObQueryNameString(lower_device, name, sizeof(buffer), &ret_size); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret); ok(!wcscmp(name->Name.Buffer, device_nameW), "got name %ls\n", name->Name.Buffer); - ok(ret_size == sizeof(*name) + sizeof(device_nameW), "got size %u\n", ret_size); + ok(ret_size == sizeof(*name) + sizeof(device_nameW), "got size %lu\n", ret_size); ok(name->Name.Length == wcslen(device_nameW) * sizeof(WCHAR), "got length %u\n", name->Name.Length); ok(name->Name.MaximumLength == sizeof(device_nameW), "got maximum length %u\n", name->Name.MaximumLength);
@@ -1914,47 +1914,47 @@ static void test_object_name(void)
ret_size = 0; ret = ObQueryNameString(event, name, sizeof(buffer), &ret_size); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret); ok(!name->Name.Buffer, "got name %ls\n", name->Name.Buffer); - ok(ret_size == sizeof(*name), "got size %u\n", ret_size); + ok(ret_size == sizeof(*name), "got size %lu\n", ret_size); ok(!name->Name.Length, "got length %u\n", name->Name.Length); ok(!name->Name.MaximumLength, "got maximum length %u\n", name->Name.MaximumLength);
ret = ZwClose(handle); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret);
RtlInitUnicodeString(&string, event_nameW); InitializeObjectAttributes(&attr, &string, OBJ_KERNEL_HANDLE, NULL, NULL); ret = ZwCreateEvent(&handle, 0, &attr, NotificationEvent, TRUE); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret); ret = ObReferenceObjectByHandle(handle, 0, *pExEventObjectType, KernelMode, (void **)&event, NULL); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret);
ret_size = 0; ret = ObQueryNameString(event, name, sizeof(buffer), &ret_size); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret); ok(!wcscmp(name->Name.Buffer, event_nameW), "got name %ls\n", name->Name.Buffer); - ok(ret_size == sizeof(*name) + sizeof(event_nameW), "got size %u\n", ret_size); + ok(ret_size == sizeof(*name) + sizeof(event_nameW), "got size %lu\n", ret_size); ok(name->Name.Length == wcslen(event_nameW) * sizeof(WCHAR), "got length %u\n", name->Name.Length); ok(name->Name.MaximumLength == sizeof(event_nameW), "got maximum length %u\n", name->Name.MaximumLength);
ObDereferenceObject(event); ret = ZwClose(handle); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret);
ret_size = 0; ret = ObQueryNameString(KeGetCurrentThread(), name, sizeof(buffer), &ret_size); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret); ok(!name->Name.Buffer, "got name %ls\n", name->Name.Buffer); - ok(ret_size == sizeof(*name), "got size %u\n", ret_size); + ok(ret_size == sizeof(*name), "got size %lu\n", ret_size); ok(!name->Name.Length, "got length %u\n", name->Name.Length); ok(!name->Name.MaximumLength, "got maximum length %u\n", name->Name.MaximumLength);
ret_size = 0; ret = ObQueryNameString(IoGetCurrentProcess(), name, sizeof(buffer), &ret_size); - ok(!ret, "got status %#x\n", ret); + ok(!ret, "got status %#lx\n", ret); ok(!name->Name.Buffer, "got name %ls\n", name->Name.Buffer); - ok(ret_size == sizeof(*name), "got size %u\n", ret_size); + ok(ret_size == sizeof(*name), "got size %lu\n", ret_size); ok(!name->Name.Length, "got length %u\n", name->Name.Length); ok(!name->Name.MaximumLength, "got maximum length %u\n", name->Name.MaximumLength); } @@ -2023,45 +2023,45 @@ static void test_affinity(void) ok(!!pKeRevertToUserAffinityThreadEx, "KeRevertToUserAffinityThreadEx is not available.\n");
count = pKeQueryActiveProcessorCountEx(1); - ok(!count, "Got unexpected count %u.\n", count); + ok(!count, "Got unexpected count %lu.\n", count);
cpu_count = pKeQueryActiveProcessorCountEx(0); - ok(cpu_count, "Got unexpected cpu_count %u.\n", cpu_count); + ok(cpu_count, "Got unexpected cpu_count %lu.\n", cpu_count);
count = pKeQueryActiveProcessorCountEx(ALL_PROCESSOR_GROUPS); - ok(count == cpu_count, "Got unexpected count %u.\n", count); + ok(count == cpu_count, "Got unexpected count %lu.\n", count);
mask_all_cpus = ~((~0u) << cpu_count);
mask = pKeQueryActiveProcessors(); - ok(mask == mask_all_cpus, "Got unexpected mask %#lx.\n", mask); + ok(mask == mask_all_cpus, "Got unexpected mask %#Ix.\n", mask);
pKeRevertToUserAffinityThreadEx(0x2);
mask = pKeSetSystemAffinityThreadEx(0); - ok(!mask, "Got unexpected mask %#lx.\n", mask); + ok(!mask, "Got unexpected mask %#Ix.\n", mask);
pKeRevertToUserAffinityThreadEx(0x2);
mask = pKeSetSystemAffinityThreadEx(0x1); - ok(mask == 0x2, "Got unexpected mask %#lx.\n", mask); + ok(mask == 0x2, "Got unexpected mask %#Ix.\n", mask);
mask = pKeSetSystemAffinityThreadEx(~(KAFFINITY)0); - ok(mask == 0x1, "Got unexpected mask %#lx.\n", mask); + ok(mask == 0x1, "Got unexpected mask %#Ix.\n", mask);
pKeRevertToUserAffinityThreadEx(~(KAFFINITY)0); mask = pKeSetSystemAffinityThreadEx(0x1); - ok(mask == mask_all_cpus, "Got unexpected mask %#lx.\n", mask); + ok(mask == mask_all_cpus, "Got unexpected mask %#Ix.\n", mask);
pKeRevertToUserAffinityThreadEx(0);
mask = pKeSetSystemAffinityThreadEx(0x1); - ok(!mask, "Got unexpected mask %#lx.\n", mask); + ok(!mask, "Got unexpected mask %#Ix.\n", mask);
KeRevertToUserAffinityThread();
mask = pKeSetSystemAffinityThreadEx(0x1); - ok(!mask, "Got unexpected mask %#lx.\n", mask); + ok(!mask, "Got unexpected mask %#Ix.\n", mask);
KeRevertToUserAffinityThread(); } @@ -2149,30 +2149,30 @@ static void test_dpc(void) KeSetSystemAffinityThread(0x1);
pKeGenericCallDpc(test_dpc_func, &data); - ok(data.call_count == cpu_count, "Got unexpected call_count %u.\n", data.call_count); - ok(data.selected_count == 2, "Got unexpected selected_count %u.\n", data.selected_count); + ok(data.call_count == cpu_count, "Got unexpected call_count %lu.\n", data.call_count); + ok(data.selected_count == 2, "Got unexpected selected_count %lu.\n", data.selected_count); ok(data.sync_barrier_start_value.Barrier == cpu_count, - "Got unexpected sync_barrier_start_value.Barrier %d.\n", + "Got unexpected sync_barrier_start_value.Barrier %ld.\n", data.sync_barrier_start_value.Barrier); ok(data.sync_barrier_start_value.TotalProcessors == cpu_count, - "Got unexpected sync_barrier_start_value.TotalProcessors %d.\n", + "Got unexpected sync_barrier_start_value.TotalProcessors %ld.\n", data.sync_barrier_start_value.TotalProcessors);
ok(data.sync_barrier_mid_value.Barrier == (0x80000000 | cpu_count), - "Got unexpected sync_barrier_mid_value.Barrier %d.\n", + "Got unexpected sync_barrier_mid_value.Barrier %ld.\n", data.sync_barrier_mid_value.Barrier); ok(data.sync_barrier_mid_value.TotalProcessors == cpu_count, - "Got unexpected sync_barrier_mid_value.TotalProcessors %d.\n", + "Got unexpected sync_barrier_mid_value.TotalProcessors %ld.\n", data.sync_barrier_mid_value.TotalProcessors);
ok(data.sync_barrier_end_value.Barrier == cpu_count, - "Got unexpected sync_barrier_end_value.Barrier %d.\n", + "Got unexpected sync_barrier_end_value.Barrier %ld.\n", data.sync_barrier_end_value.Barrier); ok(data.sync_barrier_end_value.TotalProcessors == cpu_count, - "Got unexpected sync_barrier_end_value.TotalProcessors %d.\n", + "Got unexpected sync_barrier_end_value.TotalProcessors %ld.\n", data.sync_barrier_end_value.TotalProcessors);
- ok(data.done_barrier_start_value == cpu_count, "Got unexpected done_barrier_start_value %d.\n", data.done_barrier_start_value); + ok(data.done_barrier_start_value == cpu_count, "Got unexpected done_barrier_start_value %ld.\n", data.done_barrier_start_value);
KeRevertToUserAffinityThread(); } @@ -2192,7 +2192,7 @@ static void test_process_memory(const struct main_test_input *test_input) pMmCopyVirtualMemory = get_proc_address("MmCopyVirtualMemory");
status = PsLookupProcessByProcessId((HANDLE)(ULONG_PTR)test_input->process_id, &process); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
if (status) return; @@ -2212,8 +2212,8 @@ static void test_process_memory(const struct main_test_input *test_input) size = 0xdeadbeef; status = pMmCopyVirtualMemory(process, base + test_input->teststr_offset, PsGetCurrentProcess(), buffer, sizeof(buffer), UserMode, &size); - todo_wine ok(status == STATUS_ACCESS_VIOLATION, "Got unexpected status %#x.\n", status); - ok(!size, "Got unexpected size %#lx.\n", size); + todo_wine ok(status == STATUS_ACCESS_VIOLATION, "Got unexpected status %#lx.\n", status); + ok(!size, "Got unexpected size %#Ix.\n", size);
memset(buffer, 0, sizeof(buffer)); size = 0xdeadbeef; @@ -2222,8 +2222,8 @@ static void test_process_memory(const struct main_test_input *test_input) buffer, sizeof(buffer), KernelMode, NULL); status = pMmCopyVirtualMemory(process, base + test_input->teststr_offset, PsGetCurrentProcess(), buffer, sizeof(buffer), KernelMode, &size); - todo_wine ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - todo_wine ok(size == sizeof(buffer), "Got unexpected size %lu.\n", size); + todo_wine ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + todo_wine ok(size == sizeof(buffer), "Got unexpected size %Iu.\n", size); todo_wine ok(!strcmp(buffer, teststr), "Got unexpected test string.\n"); } else @@ -2252,42 +2252,42 @@ static void test_permanence(void) RtlInitUnicodeString(&str, L"\BaseNamedObjects\wine_test_dir"); InitializeObjectAttributes(&attr, &str, 0, 0, NULL); status = ZwCreateDirectoryObject( &handle, GENERIC_ALL, &attr ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); status = ZwClose( handle ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); status = ZwOpenDirectoryObject( &handle, 0, &attr ); - ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", status); + ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "got %#lx\n", status);
attr.Attributes = OBJ_PERMANENT; status = ZwCreateDirectoryObject( &handle, GENERIC_ALL, &attr ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); status = ZwClose( handle ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status);
attr.Attributes = 0; status = ZwOpenDirectoryObject( &handle, 0, &attr ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); status = ZwMakeTemporaryObject( handle ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); status = ZwMakeTemporaryObject( handle ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); status = ZwClose( handle ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); status = ZwOpenDirectoryObject( &handle, 0, &attr ); - ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", status); + ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "got %#lx\n", status);
status = ZwCreateDirectoryObject( &handle, GENERIC_ALL, &attr ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); attr.Attributes = OBJ_PERMANENT; status = ZwOpenDirectoryObject( &handle2, 0, &attr ); - ok(status == STATUS_SUCCESS, "got %#x\n", status); + ok(status == STATUS_SUCCESS, "got %#lx\n", status); status = ZwClose( handle2 ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); status = ZwClose( handle ); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); attr.Attributes = 0; status = ZwOpenDirectoryObject( &handle, 0, &attr ); - ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", status); + ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "got %#lx\n", status); }
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack) @@ -2818,7 +2818,7 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, PUNICODE_STRING registry)
RtlInitUnicodeString(&nameW, L"\Driver\WineTestDriver"); status = ObReferenceObjectByName(&nameW, 0, NULL, 0, *pIoDriverObjectType, KernelMode, NULL, &obj); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(obj == driver, "expected %p, got %p\n", driver, obj); ObDereferenceObject(obj);
@@ -2826,14 +2826,14 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, PUNICODE_STRING registry) RtlInitUnicodeString(&linkW, L"\DosDevices\WineTestDriver");
status = IoCreateDevice(driver, 0, &nameW, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &lower_device); - ok(!status, "failed to create device, status %#x\n", status); + ok(!status, "failed to create device, status %#lx\n", status); status = IoCreateSymbolicLink(&linkW, &nameW); - ok(!status, "failed to create link, status %#x\n", status); + ok(!status, "failed to create link, status %#lx\n", status); lower_device->Flags &= ~DO_DEVICE_INITIALIZING;
RtlInitUnicodeString(&nameW, L"\Device\WineTestUpper"); status = IoCreateDevice(driver, 0, &nameW, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &upper_device); - ok(!status, "failed to create device, status %#x\n", status); + ok(!status, "failed to create device, status %#lx\n", status);
IoAttachDeviceToDeviceStack(upper_device, lower_device); upper_device->Flags &= ~DO_DEVICE_INITIALIZING; diff --git a/dlls/ntoskrnl.exe/tests/driver_netio.c b/dlls/ntoskrnl.exe/tests/driver_netio.c index 4ebacc7cf14..e406f49eacb 100644 --- a/dlls/ntoskrnl.exe/tests/driver_netio.c +++ b/dlls/ntoskrnl.exe/tests/driver_netio.c @@ -66,10 +66,10 @@ static void netio_init(void)
client_npi.Dispatch = &client_dispatch; status = WskRegister(&client_npi, ®istration); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
status = WskCaptureProviderNPI(®istration, WSK_INFINITE_WAIT, &provider_npi); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
ok(provider_npi.Dispatch->Version >= MAKE_WSK_VERSION(1, 0), "Got unexpected version %#x.\n", provider_npi.Dispatch->Version); @@ -99,9 +99,9 @@ static void test_wsk_get_address_info(void) wsk_irp->IoStatus.Information = 0xdeadbeef; status = provider_npi.Dispatch->WskGetAddressInfo(provider_npi.Client, &node_name, &service_name, NS_ALL, NULL, NULL, &result, NULL, NULL, NULL); - ok(status == STATUS_INVALID_PARAMETER, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == 0xdeadbeef, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(wsk_irp->IoStatus.Information == 0xdeadbeef, "Got unexpected Information %#lx.\n", + ok(status == STATUS_INVALID_PARAMETER, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == 0xdeadbeef, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(wsk_irp->IoStatus.Information == 0xdeadbeef, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information);
RtlInitUnicodeString(&node_name, L"dead.beef"); @@ -112,13 +112,13 @@ static void test_wsk_get_address_info(void) wsk_irp->IoStatus.Information = 0xdeadbeef; status = provider_npi.Dispatch->WskGetAddressInfo(provider_npi.Client, &node_name, &service_name, NS_ALL, NULL, NULL, &result, NULL, NULL, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); ok(wsk_irp->IoStatus.Status == STATUS_NOT_FOUND || broken(wsk_irp->IoStatus.Status == STATUS_NO_MATCH) /* Win7 */, - "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(wsk_irp->IoStatus.Information == 0, "Got unexpected Information %#lx.\n", + "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(wsk_irp->IoStatus.Information == 0, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information);
RtlInitUnicodeString(&node_name, L"127.0.0.1"); @@ -128,11 +128,11 @@ static void test_wsk_get_address_info(void) wsk_irp->IoStatus.Information = 0xdeadbeef; status = provider_npi.Dispatch->WskGetAddressInfo(provider_npi.Client, &node_name, &service_name, NS_ALL, NULL, NULL, &result, NULL, NULL, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(wsk_irp->IoStatus.Information == 0, "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(wsk_irp->IoStatus.Information == 0, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information);
count = 0; @@ -144,7 +144,7 @@ static void test_wsk_get_address_info(void) ok(addr_info->ai_addrlen == sizeof(*addr), "Got unexpected ai_addrlen %I64u.\n", (UINT64)addr_info->ai_addrlen); ok(addr->sin_family == AF_INET, "Got unexpected sin_family %u.\n", addr->sin_family); ok(ntohs(addr->sin_port) == 12345, "Got unexpected sin_port %u.\n", ntohs(addr->sin_port)); - ok(ntohl(addr->sin_addr.s_addr) == 0x7f000001, "Got unexpected sin_addr %#x.\n", + ok(ntohl(addr->sin_addr.s_addr) == 0x7f000001, "Got unexpected sin_addr %#lx.\n", ntohl(addr->sin_addr.s_addr));
++count; @@ -196,13 +196,13 @@ static void test_wsk_listen_socket(void)
status = provider_npi.Dispatch->WskSocket(NULL, AF_INET, SOCK_STREAM, IPPROTO_TCP, WSK_FLAG_LISTEN_SOCKET, &context, &client_listen_dispatch, NULL, NULL, NULL, NULL); - ok(status == STATUS_INVALID_PARAMETER, "Got unexpected status %#x.\n", status); + ok(status == STATUS_INVALID_PARAMETER, "Got unexpected status %#lx.\n", status);
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); status = provider_npi.Dispatch->WskSocket(NULL, AF_INET, SOCK_STREAM, IPPROTO_TCP, WSK_FLAG_LISTEN_SOCKET, &context, &client_listen_dispatch, NULL, NULL, NULL, wsk_irp); - ok(status == STATUS_INVALID_HANDLE, "Got unexpected status %#x.\n", status); + ok(status == STATUS_INVALID_HANDLE, "Got unexpected status %#lx.\n", status);
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); @@ -210,10 +210,10 @@ static void test_wsk_listen_socket(void) wsk_irp->IoStatus.Information = 0xdeadbeef; status = provider_npi.Dispatch->WskSocket(provider_npi.Client, AF_INET, SOCK_STREAM, IPPROTO_TCP, WSK_FLAG_LISTEN_SOCKET, &context, &client_listen_dispatch, NULL, NULL, NULL, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); ok(wsk_irp->IoStatus.Information, "Got zero Information.\n");
tcp_socket = (WSK_SOCKET *)wsk_irp->IoStatus.Information; @@ -223,10 +223,10 @@ static void test_wsk_listen_socket(void) IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); status = provider_npi.Dispatch->WskSocket(provider_npi.Client, AF_INET, SOCK_DGRAM, IPPROTO_UDP, WSK_FLAG_LISTEN_SOCKET, &context, &client_listen_dispatch, NULL, NULL, NULL, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); ok(wsk_irp->IoStatus.Information, "Got zero Information.\n");
udp_socket = (WSK_SOCKET *)wsk_irp->IoStatus.Information; @@ -241,20 +241,20 @@ static void test_wsk_listen_socket(void) wsk_irp->IoStatus.Status = 0xdeadbeef; wsk_irp->IoStatus.Information = 0xdeadbeef; status = udp_dispatch->WskBind(udp_socket, (SOCKADDR *)&addr, 0, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_NOT_IMPLEMENTED, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_NOT_IMPLEMENTED, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information);
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); status = udp_dispatch->Basic.WskCloseSocket(udp_socket, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status);
do { @@ -263,13 +263,13 @@ static void test_wsk_listen_socket(void) wsk_irp->IoStatus.Status = 0xdeadbeef; wsk_irp->IoStatus.Information = 0xdeadbeef; status = tcp_dispatch->WskBind(tcp_socket, (SOCKADDR *)&addr, 0, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS || wsk_irp->IoStatus.Status == STATUS_ADDRESS_ALREADY_ASSOCIATED, - "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#lx.\n", + "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information); } while (wsk_irp->IoStatus.Status == STATUS_ADDRESS_ALREADY_ASSOCIATED); @@ -282,7 +282,7 @@ static void test_wsk_listen_socket(void) memset(&remote_addr, 0, sizeof(remote_addr)); status = tcp_dispatch->WskAccept(tcp_socket, 0, NULL, NULL, (SOCKADDR *)&local_addr, (SOCKADDR *)&remote_addr, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status);
if (0) { @@ -290,12 +290,12 @@ static void test_wsk_listen_socket(void) IoReuseIrp(irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(irp, irp_completion_routine, &event, TRUE, TRUE, TRUE); status = tcp_dispatch->WskAccept(tcp_socket, 0, NULL, NULL, NULL, NULL, irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); }
status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, &timeout); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); ok(wsk_irp->IoStatus.Information, "Got zero Information.\n");
if (status == STATUS_SUCCESS && wsk_irp->IoStatus.Status == STATUS_SUCCESS) @@ -303,12 +303,12 @@ static void test_wsk_listen_socket(void) ok(local_addr.sin_family == AF_INET, "Got unexpected sin_family %u.\n", local_addr.sin_family); ok(local_addr.sin_port == htons(SERVER_LISTEN_PORT), "Got unexpected sin_port %u.\n", ntohs(local_addr.sin_port)); - ok(local_addr.sin_addr.s_addr == htonl(0x7f000001), "Got unexpected sin_addr %#x.\n", + ok(local_addr.sin_addr.s_addr == htonl(0x7f000001), "Got unexpected sin_addr %#lx.\n", ntohl(local_addr.sin_addr.s_addr));
ok(remote_addr.sin_family == AF_INET, "Got unexpected sin_family %u.\n", remote_addr.sin_family); ok(remote_addr.sin_port, "Got zero sin_port.\n"); - ok(remote_addr.sin_addr.s_addr == htonl(0x7f000001), "Got unexpected sin_addr %#x.\n", + ok(remote_addr.sin_addr.s_addr == htonl(0x7f000001), "Got unexpected sin_addr %#lx.\n", ntohl(remote_addr.sin_addr.s_addr));
accept_socket = (WSK_SOCKET *)wsk_irp->IoStatus.Information; @@ -317,7 +317,7 @@ static void test_wsk_listen_socket(void) IoReuseIrp(irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(irp, irp_completion_routine, &event, TRUE, TRUE, TRUE); status = accept_dispatch->WskReceive(accept_socket, &wsk_buf2, 0, irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status);
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); @@ -325,29 +325,29 @@ static void test_wsk_listen_socket(void) /* Setting Length in WSK_BUF greater than MDL allocation size BSODs Windows. * wsk_buf1.Length = TEST_BUFFER_LENGTH * 2; */ status = accept_dispatch->WskSend(accept_socket, &wsk_buf1, 0, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status);
status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, &timeout); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(wsk_irp->IoStatus.Information == TEST_BUFFER_LENGTH, "Got unexpected status %#x.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(wsk_irp->IoStatus.Information == TEST_BUFFER_LENGTH, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status);
status = KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, &timeout); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", irp->IoStatus.Status); - ok(irp->IoStatus.Information == sizeof(test_receive_string), "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", irp->IoStatus.Status); + ok(irp->IoStatus.Information == sizeof(test_receive_string), "Got unexpected Information %#Ix.\n", irp->IoStatus.Information); ok(!strcmp(buffer2, test_receive_string), "Received unexpected data.\n");
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); status = accept_dispatch->Basic.WskCloseSocket(accept_socket, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information); }
@@ -355,24 +355,24 @@ static void test_wsk_listen_socket(void) IoReuseIrp(irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(irp, irp_completion_routine, &event, TRUE, TRUE, TRUE); status = tcp_dispatch->WskAccept(tcp_socket, 0, NULL, NULL, NULL, NULL, irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status);
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); wsk_irp->IoStatus.Status = 0xdeadbeef; wsk_irp->IoStatus.Information = 0xdeadbeef; status = tcp_dispatch->Basic.WskCloseSocket(tcp_socket, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information);
status = KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, &timeout); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(irp->IoStatus.Status == STATUS_CANCELLED, "Got unexpected status %#x.\n", irp->IoStatus.Status); - ok(!irp->IoStatus.Information, "Got unexpected Information %#lx.\n", irp->IoStatus.Information); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(irp->IoStatus.Status == STATUS_CANCELLED, "Got unexpected status %#lx.\n", irp->IoStatus.Status); + ok(!irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", irp->IoStatus.Information); IoFreeIrp(irp);
IoFreeMdl(mdl1); @@ -398,10 +398,10 @@ static void test_wsk_connect_socket(void) wsk_irp->IoStatus.Information = 0xdeadbeef; status = provider_npi.Dispatch->WskSocket(provider_npi.Client, AF_INET, SOCK_STREAM, IPPROTO_TCP, WSK_FLAG_CONNECTION_SOCKET, &context, &connect_dispatch, NULL, NULL, NULL, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); ok(wsk_irp->IoStatus.Information, "Got zero Information.\n");
socket = (WSK_SOCKET *)wsk_irp->IoStatus.Information; @@ -415,11 +415,11 @@ static void test_wsk_connect_socket(void) IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); status = connect_dispatch->WskConnect(socket, (SOCKADDR *)&addr, 0, wsk_irp); - ok(status == STATUS_INVALID_DEVICE_STATE, "Got unexpected status %#x.\n", status); + ok(status == STATUS_INVALID_DEVICE_STATE, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, &timeout); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_INVALID_DEVICE_STATE, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_INVALID_DEVICE_STATE, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information);
memset(&addr, 0, sizeof(addr)); @@ -430,11 +430,11 @@ static void test_wsk_connect_socket(void) wsk_irp->IoStatus.Status = 0xdeadbeef; wsk_irp->IoStatus.Information = 0xdeadbeef; status = connect_dispatch->WskBind(socket, (SOCKADDR *)&addr, 0, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information);
addr.sin_port = htons(CLIENT_LISTEN_PORT); @@ -443,11 +443,11 @@ static void test_wsk_connect_socket(void) IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); status = connect_dispatch->WskConnect(socket, (SOCKADDR *)&addr, 0, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, &timeout); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information);
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); @@ -455,11 +455,11 @@ static void test_wsk_connect_socket(void) wsk_irp->IoStatus.Status = 0xdeadbeef; wsk_irp->IoStatus.Information = 0xdeadbeef; status = connect_dispatch->Basic.WskCloseSocket(socket, wsk_irp); - ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PENDING, "Got unexpected status %#lx.\n", status); status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, NULL); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); - ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status); - ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#lx.\n", + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", wsk_irp->IoStatus.Status); + ok(!wsk_irp->IoStatus.Information, "Got unexpected Information %#Ix.\n", wsk_irp->IoStatus.Information); }
@@ -552,9 +552,9 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, PUNICODE_STRING registry) RtlInitUnicodeString(&linkW, driver_link);
status = IoCreateDevice(driver, 0, &nameW, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &device_obj); - ok(!status, "failed to create device, status %#x\n", status); + ok(!status, "failed to create device, status %#lx\n", status); status = IoCreateSymbolicLink(&linkW, &nameW); - ok(!status, "failed to create link, status %#x\n", status); + ok(!status, "failed to create link, status %#lx\n", status); device_obj->Flags &= ~DO_DEVICE_INITIALIZING;
return STATUS_SUCCESS; diff --git a/dlls/ntoskrnl.exe/tests/driver_pnp.c b/dlls/ntoskrnl.exe/tests/driver_pnp.c index aa078ab0b2f..972cc61c6df 100644 --- a/dlls/ntoskrnl.exe/tests/driver_pnp.c +++ b/dlls/ntoskrnl.exe/tests/driver_pnp.c @@ -264,7 +264,7 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device_obj, IRP *irp) ok(!stack->Parameters.StartDevice.AllocatedResourcesTranslated, "expected no translated resources\n");
status = IoRegisterDeviceInterface(device_obj, &child_class, NULL, &device->child_symlink); - ok(!status, "Failed to register interface, status %#x.\n", status); + ok(!status, "Failed to register interface, status %#lx.\n", status);
IoSetDeviceInterfaceState(&device->child_symlink, TRUE);
@@ -322,15 +322,15 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device_obj, IRP *irp) ok(!caps->NonDynamic, "got NonDynamic %u\n", caps->NonDynamic); ok(!caps->WarmEjectSupported, "got WarmEjectSupported %u\n", caps->WarmEjectSupported); ok(!caps->NoDisplayInUI, "got NoDisplayInUI %u\n", caps->NoDisplayInUI); - ok(caps->Address == 0xffffffff, "got Address %#x\n", caps->Address); - ok(caps->UINumber == 0xffffffff, "got UINumber %#x\n", caps->UINumber); + ok(caps->Address == 0xffffffff, "got Address %#lx\n", caps->Address); + ok(caps->UINumber == 0xffffffff, "got UINumber %#lx\n", caps->UINumber); for (i = 0; i < PowerSystemMaximum; ++i) ok(caps->DeviceState[i] == PowerDeviceUnspecified, "got DeviceState[%u] %u\n", i, caps->DeviceState[i]); ok(caps->SystemWake == PowerSystemUnspecified, "got SystemWake %u\n", caps->SystemWake); ok(caps->DeviceWake == PowerDeviceUnspecified, "got DeviceWake %u\n", caps->DeviceWake); - ok(!caps->D1Latency, "got D1Latency %u\n", caps->D1Latency); - ok(!caps->D2Latency, "got D2Latency %u\n", caps->D2Latency); - ok(!caps->D3Latency, "got D3Latency %u\n", caps->D3Latency); + ok(!caps->D1Latency, "got D1Latency %lu\n", caps->D1Latency); + ok(!caps->D2Latency, "got D2Latency %lu\n", caps->D2Latency); + ok(!caps->D3Latency, "got D3Latency %lu\n", caps->D3Latency);
/* If caps->RawDeviceOK is not set, we won't receive * IRP_MN_START_DEVICE unless there's a function driver. */ @@ -430,8 +430,8 @@ static void test_bus_query_caps(DEVICE_OBJECT *top_device) stack->MinorFunction = IRP_MN_QUERY_CAPABILITIES; stack->Parameters.DeviceCapabilities.Capabilities = ∩︀ ret = IoCallDriver(top_device, irp); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); - ok(io.Status == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret); + ok(io.Status == STATUS_SUCCESS, "got %#lx\n", ret);
ok(caps.Size == sizeof(caps), "wrong size %u\n", caps.Size); ok(caps.Version == 1, "wrong version %u\n", caps.Version); @@ -453,8 +453,8 @@ static void test_bus_query_caps(DEVICE_OBJECT *top_device) ok(!caps.NonDynamic, "got NonDynamic %u\n", caps.NonDynamic); ok(!caps.WarmEjectSupported, "got WarmEjectSupported %u\n", caps.WarmEjectSupported); ok(!caps.NoDisplayInUI, "got NoDisplayInUI %u\n", caps.NoDisplayInUI); - ok(!caps.Address, "got Address %#x\n", caps.Address); - ok(!caps.UINumber, "got UINumber %#x\n", caps.UINumber); + ok(!caps.Address, "got Address %#lx\n", caps.Address); + ok(!caps.UINumber, "got UINumber %#lx\n", caps.UINumber); ok(caps.DeviceState[PowerSystemUnspecified] == PowerDeviceUnspecified, "got DeviceState[PowerSystemUnspecified] %u\n", caps.DeviceState[PowerSystemUnspecified]); todo_wine ok(caps.DeviceState[PowerSystemWorking] == PowerDeviceD0, @@ -463,9 +463,9 @@ static void test_bus_query_caps(DEVICE_OBJECT *top_device) todo_wine ok(caps.DeviceState[i] == PowerDeviceD3, "got DeviceState[%u] %u\n", i, caps.DeviceState[i]); ok(caps.SystemWake == PowerSystemUnspecified, "got SystemWake %u\n", caps.SystemWake); ok(caps.DeviceWake == PowerDeviceUnspecified, "got DeviceWake %u\n", caps.DeviceWake); - ok(!caps.D1Latency, "got D1Latency %u\n", caps.D1Latency); - ok(!caps.D2Latency, "got D2Latency %u\n", caps.D2Latency); - ok(!caps.D3Latency, "got D3Latency %u\n", caps.D3Latency); + ok(!caps.D1Latency, "got D1Latency %lu\n", caps.D1Latency); + ok(!caps.D2Latency, "got D2Latency %lu\n", caps.D2Latency); + ok(!caps.D3Latency, "got D3Latency %lu\n", caps.D3Latency);
memset(&caps, 0xff, sizeof(caps)); caps.Size = sizeof(caps); @@ -479,8 +479,8 @@ static void test_bus_query_caps(DEVICE_OBJECT *top_device) stack->MinorFunction = IRP_MN_QUERY_CAPABILITIES; stack->Parameters.DeviceCapabilities.Capabilities = ∩︀ ret = IoCallDriver(top_device, irp); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); - ok(io.Status == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret); + ok(io.Status == STATUS_SUCCESS, "got %#lx\n", ret);
ok(caps.Size == sizeof(caps), "wrong size %u\n", caps.Size); ok(caps.Version == 1, "wrong version %u\n", caps.Version); @@ -502,8 +502,8 @@ static void test_bus_query_caps(DEVICE_OBJECT *top_device) ok(caps.NonDynamic, "got NonDynamic %u\n", caps.NonDynamic); ok(caps.WarmEjectSupported, "got WarmEjectSupported %u\n", caps.WarmEjectSupported); ok(caps.NoDisplayInUI, "got NoDisplayInUI %u\n", caps.NoDisplayInUI); - ok(caps.Address == 0xffffffff, "got Address %#x\n", caps.Address); - ok(caps.UINumber == 0xffffffff, "got UINumber %#x\n", caps.UINumber); + ok(caps.Address == 0xffffffff, "got Address %#lx\n", caps.Address); + ok(caps.UINumber == 0xffffffff, "got UINumber %#lx\n", caps.UINumber); todo_wine ok(caps.DeviceState[PowerSystemUnspecified] == PowerDeviceUnspecified, "got DeviceState[PowerSystemUnspecified] %u\n", caps.DeviceState[PowerSystemUnspecified]); todo_wine ok(caps.DeviceState[PowerSystemWorking] == PowerDeviceD0, @@ -512,9 +512,9 @@ static void test_bus_query_caps(DEVICE_OBJECT *top_device) todo_wine ok(caps.DeviceState[i] == PowerDeviceD3, "got DeviceState[%u] %u\n", i, caps.DeviceState[i]); ok(caps.SystemWake == 0xffffffff, "got SystemWake %u\n", caps.SystemWake); ok(caps.DeviceWake == 0xffffffff, "got DeviceWake %u\n", caps.DeviceWake); - ok(caps.D1Latency == 0xffffffff, "got D1Latency %u\n", caps.D1Latency); - ok(caps.D2Latency == 0xffffffff, "got D2Latency %u\n", caps.D2Latency); - ok(caps.D3Latency == 0xffffffff, "got D3Latency %u\n", caps.D3Latency); + ok(caps.D1Latency == 0xffffffff, "got D1Latency %lu\n", caps.D1Latency); + ok(caps.D2Latency == 0xffffffff, "got D2Latency %lu\n", caps.D2Latency); + ok(caps.D3Latency == 0xffffffff, "got D3Latency %lu\n", caps.D3Latency); }
static void test_bus_query_id(DEVICE_OBJECT *top_device) @@ -533,8 +533,8 @@ static void test_bus_query_id(DEVICE_OBJECT *top_device) stack->MinorFunction = IRP_MN_QUERY_ID; stack->Parameters.QueryId.IdType = BusQueryDeviceID; ret = IoCallDriver(top_device, irp); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); - ok(io.Status == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret); + ok(io.Status == STATUS_SUCCESS, "got %#lx\n", ret); ok(!wcscmp((WCHAR *)io.Information, L"ROOT\WINETEST"), "got id '%ls'\n", (WCHAR *)io.Information); ExFreePool((WCHAR *)io.Information);
@@ -544,8 +544,8 @@ static void test_bus_query_id(DEVICE_OBJECT *top_device) stack->MinorFunction = IRP_MN_QUERY_ID; stack->Parameters.QueryId.IdType = BusQueryInstanceID; ret = IoCallDriver(top_device, irp); - ok(ret == STATUS_SUCCESS, "got %#x\n", ret); - ok(io.Status == STATUS_SUCCESS, "got %#x\n", ret); + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret); + ok(io.Status == STATUS_SUCCESS, "got %#lx\n", ret); ok(!wcscmp((WCHAR *)io.Information, L"0"), "got id '%ls'\n", (WCHAR *)io.Information); ExFreePool((WCHAR *)io.Information); } @@ -598,7 +598,7 @@ static NTSTATUS fdo_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG code) swprintf(name, ARRAY_SIZE(name), L"\Device\winetest_pnp_%x", id); RtlInitUnicodeString(&string, name); status = IoCreateDevice(driver_obj, sizeof(*device), &string, FILE_DEVICE_UNKNOWN, 0, FALSE, &device_obj); - ok(!status, "Failed to create device, status %#x.\n", status); + ok(!status, "Failed to create device, status %#lx.\n", status);
device = device_obj->DeviceExtension; memset(device, 0, sizeof(*device)); @@ -647,7 +647,7 @@ static NTSTATUS fdo_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG code) }
default: - ok(0, "Unexpected ioctl %#x.\n", code); + ok(0, "Unexpected ioctl %#lx.\n", code); return STATUS_NOT_IMPLEMENTED; } } @@ -682,7 +682,7 @@ static NTSTATUS pdo_ioctl(DEVICE_OBJECT *device_obj, IRP *irp, IO_STACK_LOCATION return STATUS_SUCCESS;
default: - ok(0, "Unexpected ioctl %#x.\n", code); + ok(0, "Unexpected ioctl %#lx.\n", code); return STATUS_NOT_IMPLEMENTED; } } diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 13d1af4e7cd..64debcbebbf 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -75,7 +75,7 @@ static void load_resource(const WCHAR *name, WCHAR *filename) GetTempFileNameW(path, name, 0, filename);
file = CreateFileW(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "failed to create %s, error %u\n", debugstr_w(filename), GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to create %s, error %lu\n", debugstr_w(filename), GetLastError());
res = FindResourceW(NULL, name, L"TESTDLL"); ok( res != 0, "couldn't find resource\n" ); @@ -114,31 +114,31 @@ static BOOL testsign_create_cert(struct testsign_context *ctx) swprintf(container_name, ARRAY_SIZE(container_name), L"wine_testsign%u", rand());
ret = CryptAcquireContextW(&ctx->provider, container_name, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(ret, "Failed to create container, error %#x\n", GetLastError()); + ok(ret, "Failed to create container, error %#lx\n", GetLastError());
ret = CryptGenKey(ctx->provider, AT_SIGNATURE, CRYPT_EXPORTABLE, &key); - ok(ret, "Failed to create key, error %#x\n", GetLastError()); + ok(ret, "Failed to create key, error %#lx\n", GetLastError()); ret = CryptDestroyKey(key); - ok(ret, "Failed to destroy key, error %#x\n", GetLastError()); + ok(ret, "Failed to destroy key, error %#lx\n", GetLastError()); ret = CryptGetUserKey(ctx->provider, AT_SIGNATURE, &key); - ok(ret, "Failed to get user key, error %#x\n", GetLastError()); + ok(ret, "Failed to get user key, error %#lx\n", GetLastError()); ret = CryptDestroyKey(key); - ok(ret, "Failed to destroy key, error %#x\n", GetLastError()); + ok(ret, "Failed to destroy key, error %#lx\n", GetLastError());
size = sizeof(encoded_name); ret = CertStrToNameA(X509_ASN_ENCODING, "CN=winetest_cert", CERT_X500_NAME_STR, NULL, encoded_name, &size, NULL); - ok(ret, "Failed to convert name, error %#x\n", GetLastError()); + ok(ret, "Failed to convert name, error %#lx\n", GetLastError()); key_info.CertIssuer.cbData = size; key_info.CertIssuer.pbData = encoded_name;
size = sizeof(public_key_info_buffer); ret = CryptExportPublicKeyInfo(ctx->provider, AT_SIGNATURE, X509_ASN_ENCODING, public_key_info, &size); - ok(ret, "Failed to export public key, error %#x\n", GetLastError()); + ok(ret, "Failed to export public key, error %#lx\n", GetLastError()); cert_info.SubjectPublicKeyInfo = *public_key_info;
size = sizeof(hash_buffer); ret = CryptHashPublicKeyInfo(ctx->provider, CALG_MD5, 0, X509_ASN_ENCODING, public_key_info, hash_buffer, &size); - ok(ret, "Failed to hash public key, error %#x\n", GetLastError()); + ok(ret, "Failed to hash public key, error %#lx\n", GetLastError());
key_info.KeyId.cbData = size; key_info.KeyId.pbData = hash_buffer; @@ -149,7 +149,7 @@ static BOOL testsign_create_cert(struct testsign_context *ctx)
size = sizeof(encoded_key_id); ret = CryptEncodeObject(X509_ASN_ENCODING, X509_AUTHORITY_KEY_ID, &key_info, encoded_key_id, &size); - ok(ret, "Failed to convert name, error %#x\n", GetLastError()); + ok(ret, "Failed to convert name, error %#lx\n", GetLastError());
extension.pszObjId = (char *)szOID_AUTHORITY_KEY_IDENTIFIER; extension.fCritical = TRUE; @@ -170,14 +170,14 @@ static BOOL testsign_create_cert(struct testsign_context *ctx) size = sizeof(cert_buffer); ret = CryptSignAndEncodeCertificate(ctx->provider, AT_SIGNATURE, X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, &cert_info, &algid, NULL, cert_buffer, &size); - ok(ret, "Failed to create certificate, error %#x\n", GetLastError()); + ok(ret, "Failed to create certificate, error %#lx\n", GetLastError());
ctx->cert = CertCreateCertificateContext(X509_ASN_ENCODING, cert_buffer, size); - ok(!!ctx->cert, "Failed to create context, error %#x\n", GetLastError()); + ok(!!ctx->cert, "Failed to create context, error %#lx\n", GetLastError());
size = sizeof(provider_nameA); ret = CryptGetProvParam(ctx->provider, PP_NAME, provider_nameA, &size, 0); - ok(ret, "Failed to get prov param, error %#x\n", GetLastError()); + ok(ret, "Failed to get prov param, error %#lx\n", GetLastError()); MultiByteToWideChar(CP_ACP, 0, (char *)provider_nameA, -1, provider_nameW, ARRAY_SIZE(provider_nameW));
provider_info.pwszContainerName = (WCHAR *)container_name; @@ -185,7 +185,7 @@ static BOOL testsign_create_cert(struct testsign_context *ctx) provider_info.dwProvType = PROV_RSA_FULL; provider_info.dwKeySpec = AT_SIGNATURE; ret = CertSetCertificateContextProperty(ctx->cert, CERT_KEY_PROV_INFO_PROP_ID, 0, &provider_info); - ok(ret, "Failed to set provider info, error %#x\n", GetLastError()); + ok(ret, "Failed to set provider info, error %#lx\n", GetLastError());
ctx->root_store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_A, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, "root"); if (!ctx->root_store && GetLastError() == ERROR_ACCESS_DENIED) @@ -193,35 +193,35 @@ static BOOL testsign_create_cert(struct testsign_context *ctx) skip("Failed to open root store.\n");
ret = CertFreeCertificateContext(ctx->cert); - ok(ret, "Failed to free certificate, error %u\n", GetLastError()); + ok(ret, "Failed to free certificate, error %lu\n", GetLastError()); ret = CryptReleaseContext(ctx->provider, 0); - ok(ret, "failed to release context, error %u\n", GetLastError()); + ok(ret, "failed to release context, error %lu\n", GetLastError());
return FALSE; } - ok(!!ctx->root_store, "Failed to open store, error %u\n", GetLastError()); + ok(!!ctx->root_store, "Failed to open store, error %lu\n", GetLastError()); ret = CertAddCertificateContextToStore(ctx->root_store, ctx->cert, CERT_STORE_ADD_ALWAYS, &ctx->root_cert); if (!ret && GetLastError() == ERROR_ACCESS_DENIED) { skip("Failed to add self-signed certificate to store.\n");
ret = CertFreeCertificateContext(ctx->cert); - ok(ret, "Failed to free certificate, error %u\n", GetLastError()); + ok(ret, "Failed to free certificate, error %lu\n", GetLastError()); ret = CertCloseStore(ctx->root_store, CERT_CLOSE_STORE_CHECK_FLAG); - ok(ret, "Failed to close store, error %u\n", GetLastError()); + ok(ret, "Failed to close store, error %lu\n", GetLastError()); ret = CryptReleaseContext(ctx->provider, 0); - ok(ret, "failed to release context, error %u\n", GetLastError()); + ok(ret, "failed to release context, error %lu\n", GetLastError());
return FALSE; } - ok(ret, "Failed to add certificate, error %u\n", GetLastError()); + ok(ret, "Failed to add certificate, error %lu\n", GetLastError());
ctx->publisher_store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_A, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, "trustedpublisher"); - ok(!!ctx->publisher_store, "Failed to open store, error %u\n", GetLastError()); + ok(!!ctx->publisher_store, "Failed to open store, error %lu\n", GetLastError()); ret = CertAddCertificateContextToStore(ctx->publisher_store, ctx->cert, CERT_STORE_ADD_ALWAYS, &ctx->publisher_cert); - ok(ret, "Failed to add certificate, error %u\n", GetLastError()); + ok(ret, "Failed to add certificate, error %lu\n", GetLastError());
return TRUE; } @@ -231,20 +231,20 @@ static void testsign_cleanup(struct testsign_context *ctx) BOOL ret;
ret = CertFreeCertificateContext(ctx->cert); - ok(ret, "Failed to free certificate, error %u\n", GetLastError()); + ok(ret, "Failed to free certificate, error %lu\n", GetLastError());
ret = CertFreeCertificateContext(ctx->root_cert); - ok(ret, "Failed to free certificate context, error %u\n", GetLastError()); + ok(ret, "Failed to free certificate context, error %lu\n", GetLastError()); ret = CertCloseStore(ctx->root_store, CERT_CLOSE_STORE_CHECK_FLAG); - ok(ret, "Failed to close store, error %u\n", GetLastError()); + ok(ret, "Failed to close store, error %lu\n", GetLastError());
ret = CertFreeCertificateContext(ctx->publisher_cert); - ok(ret, "Failed to free certificate context, error %u\n", GetLastError()); + ok(ret, "Failed to free certificate context, error %lu\n", GetLastError()); ret = CertCloseStore(ctx->publisher_store, CERT_CLOSE_STORE_CHECK_FLAG); - ok(ret, "Failed to close store, error %u\n", GetLastError()); + ok(ret, "Failed to close store, error %lu\n", GetLastError());
ret = CryptReleaseContext(ctx->provider, 0); - ok(ret, "failed to release context, error %u\n", GetLastError()); + ok(ret, "failed to release context, error %lu\n", GetLastError()); }
static void testsign_sign(struct testsign_context *ctx, const WCHAR *filename) @@ -272,7 +272,7 @@ static void testsign_sign(struct testsign_context *ctx, const WCHAR *filename) authcode.pwszName = L""; authcode.pwszInfo = L""; hr = pSignerSign(&subject, &cert_info, &signature, NULL, NULL, NULL, NULL); - todo_wine ok(hr == S_OK || broken(hr == NTE_BAD_ALGID) /* < 7 */, "Failed to sign, hr %#x\n", hr); + todo_wine ok(hr == S_OK || broken(hr == NTE_BAD_ALGID) /* < 7 */, "Failed to sign, hr %#lx\n", hr); }
static void unload_driver(SC_HANDLE service) @@ -285,10 +285,10 @@ static void unload_driver(SC_HANDLE service) BOOL ret; Sleep(100); ret = QueryServiceStatus(service, &status); - ok(ret, "QueryServiceStatus failed: %u\n", GetLastError()); + ok(ret, "QueryServiceStatus failed: %lu\n", GetLastError()); } ok(status.dwCurrentState == SERVICE_STOPPED, - "expected SERVICE_STOPPED, got %d\n", status.dwCurrentState); + "expected SERVICE_STOPPED, got %ld\n", status.dwCurrentState);
DeleteService(service); CloseServiceHandle(service); @@ -319,7 +319,7 @@ static SC_HANDLE load_driver(struct testsign_context *ctx, WCHAR *filename, SERVICE_ALL_ACCESS, SERVICE_KERNEL_DRIVER, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, filename, NULL, NULL, NULL, NULL, NULL); - ok(!!service, "CreateService failed: %u\n", GetLastError()); + ok(!!service, "CreateService failed: %lu\n", GetLastError());
CloseServiceHandle(manager); return service; @@ -348,21 +348,21 @@ static BOOL start_driver(HANDLE service, BOOL vista_plus) CloseServiceHandle(service); return FALSE; } - ok(ret, "StartService failed: %u\n", GetLastError()); + ok(ret, "StartService failed: %lu\n", GetLastError());
/* wait for the service to start up properly */ ret = QueryServiceStatus(service, &status); - ok(ret, "QueryServiceStatus failed: %u\n", GetLastError()); + ok(ret, "QueryServiceStatus failed: %lu\n", GetLastError()); while (status.dwCurrentState == SERVICE_START_PENDING) { Sleep(100); ret = QueryServiceStatus(service, &status); - ok(ret, "QueryServiceStatus failed: %u\n", GetLastError()); + ok(ret, "QueryServiceStatus failed: %lu\n", GetLastError()); } ok(status.dwCurrentState == SERVICE_RUNNING, - "expected SERVICE_RUNNING, got %d\n", status.dwCurrentState); + "expected SERVICE_RUNNING, got %ld\n", status.dwCurrentState); ok(status.dwServiceType == SERVICE_KERNEL_DRIVER, - "expected SERVICE_KERNEL_DRIVER, got %#x\n", status.dwServiceType); + "expected SERVICE_KERNEL_DRIVER, got %#lx\n", status.dwServiceType);
return TRUE; } @@ -379,7 +379,7 @@ static void cat_okfile(void) do { ReadFile(okfile, buffer, sizeof(buffer), &size, NULL); - printf("%.*s", size, buffer); + printf("%.*s", (int)size, buffer); } while (size == sizeof(buffer));
SetFilePointer(okfile, 0, NULL, FILE_BEGIN); @@ -404,8 +404,8 @@ static void main_test(void) modified_value = 0;
res = DeviceIoControl(device, IOCTL_WINETEST_MAIN_TEST, test_input, sizeof(*test_input), NULL, 0, &size, NULL); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); - ok(!size, "got size %u\n", size); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); + ok(!size, "got size %lu\n", size);
heap_free(test_input); } @@ -418,15 +418,15 @@ static void test_basic_ioctl(void)
res = DeviceIoControl(device, IOCTL_WINETEST_BASIC_IOCTL, NULL, 0, buf, sizeof(buf), &written, NULL); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); - ok(written == sizeof(teststr), "got size %d\n", written); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); + ok(written == sizeof(teststr), "got size %ld\n", written); ok(!strcmp(buf, teststr), "got '%s'\n", buf);
memset(buf, 0, sizeof(buf)); res = DeviceIoControl(device, IOCTL_WINETEST_BASIC_IOCTL, inbuf, sizeof(inbuf), buf, 10, &written, NULL); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); - ok(written == 10, "got size %d\n", written); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); + ok(written == 10, "got size %ld\n", written); ok(!strcmp(buf, "Wine is no"), "got '%s'\n", buf); }
@@ -443,77 +443,77 @@ static void test_overlapped(void)
file = CreateFileA("\\.\WineTestDriver", FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open device: %lu\n", GetLastError());
/* test cancelling all device requests */ res = DeviceIoControl(file, IOCTL_WINETEST_RESET_CANCEL, NULL, 0, NULL, 0, NULL, &overlapped); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError());
res = DeviceIoControl(file, IOCTL_WINETEST_TEST_CANCEL, NULL, 0, NULL, 0, NULL, &overlapped); - ok(!res && GetLastError() == ERROR_IO_PENDING, "DeviceIoControl failed: %u\n", GetLastError()); + ok(!res && GetLastError() == ERROR_IO_PENDING, "DeviceIoControl failed: %lu\n", GetLastError());
res = DeviceIoControl(file, IOCTL_WINETEST_TEST_CANCEL, NULL, 0, NULL, 0, NULL, &overlapped2); - ok(!res && GetLastError() == ERROR_IO_PENDING, "DeviceIoControl failed: %u\n", GetLastError()); + ok(!res && GetLastError() == ERROR_IO_PENDING, "DeviceIoControl failed: %lu\n", GetLastError());
cancel_cnt = 0xdeadbeef; res = DeviceIoControl(file, IOCTL_WINETEST_GET_CANCEL_COUNT, NULL, 0, &cancel_cnt, sizeof(cancel_cnt), NULL, &overlapped); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); - ok(cancel_cnt == 0, "cancel_cnt = %u\n", cancel_cnt); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); + ok(cancel_cnt == 0, "cancel_cnt = %lu\n", cancel_cnt);
CancelIo(file);
cancel_cnt = 0xdeadbeef; res = DeviceIoControl(file, IOCTL_WINETEST_GET_CANCEL_COUNT, NULL, 0, &cancel_cnt, sizeof(cancel_cnt), NULL, &overlapped); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); - ok(cancel_cnt == 2, "cancel_cnt = %u\n", cancel_cnt); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); + ok(cancel_cnt == 2, "cancel_cnt = %lu\n", cancel_cnt);
/* test cancelling selected overlapped event */ if (pCancelIoEx) { res = DeviceIoControl(file, IOCTL_WINETEST_RESET_CANCEL, NULL, 0, NULL, 0, NULL, &overlapped); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError());
res = DeviceIoControl(file, IOCTL_WINETEST_TEST_CANCEL, NULL, 0, NULL, 0, NULL, &overlapped); - ok(!res && GetLastError() == ERROR_IO_PENDING, "DeviceIoControl failed: %u\n", GetLastError()); + ok(!res && GetLastError() == ERROR_IO_PENDING, "DeviceIoControl failed: %lu\n", GetLastError());
res = DeviceIoControl(file, IOCTL_WINETEST_TEST_CANCEL, NULL, 0, NULL, 0, NULL, &overlapped2); - ok(!res && GetLastError() == ERROR_IO_PENDING, "DeviceIoControl failed: %u\n", GetLastError()); + ok(!res && GetLastError() == ERROR_IO_PENDING, "DeviceIoControl failed: %lu\n", GetLastError());
pCancelIoEx(file, &overlapped);
cancel_cnt = 0xdeadbeef; res = DeviceIoControl(file, IOCTL_WINETEST_GET_CANCEL_COUNT, NULL, 0, &cancel_cnt, sizeof(cancel_cnt), NULL, &overlapped); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); - ok(cancel_cnt == 1, "cancel_cnt = %u\n", cancel_cnt); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); + ok(cancel_cnt == 1, "cancel_cnt = %lu\n", cancel_cnt);
pCancelIoEx(file, &overlapped2);
cancel_cnt = 0xdeadbeef; res = DeviceIoControl(file, IOCTL_WINETEST_GET_CANCEL_COUNT, NULL, 0, &cancel_cnt, sizeof(cancel_cnt), NULL, &overlapped); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); - ok(cancel_cnt == 2, "cancel_cnt = %u\n", cancel_cnt); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); + ok(cancel_cnt == 2, "cancel_cnt = %lu\n", cancel_cnt); }
port = CreateIoCompletionPort(file, NULL, 0xdeadbeef, 0); - ok(port != NULL, "CreateIoCompletionPort failed, error %u\n", GetLastError()); + ok(port != NULL, "CreateIoCompletionPort failed, error %lu\n", GetLastError()); res = GetQueuedCompletionStatus(port, &size, &key, &o, 0); - ok(!res && GetLastError() == WAIT_TIMEOUT, "GetQueuedCompletionStatus returned %x(%u)\n", res, GetLastError()); + ok(!res && GetLastError() == WAIT_TIMEOUT, "GetQueuedCompletionStatus returned %x(%lu)\n", res, GetLastError());
res = DeviceIoControl(file, IOCTL_WINETEST_RESET_CANCEL, NULL, 0, NULL, 0, NULL, &overlapped); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); res = GetQueuedCompletionStatus(port, &size, &key, &o, 0); - ok(res, "GetQueuedCompletionStatus failed: %u\n", GetLastError()); + ok(res, "GetQueuedCompletionStatus failed: %lu\n", GetLastError()); ok(o == &overlapped, "o != overlapped\n");
if (pSetFileCompletionNotificationModes) { res = pSetFileCompletionNotificationModes(file, FILE_SKIP_COMPLETION_PORT_ON_SUCCESS); - ok(res, "SetFileCompletionNotificationModes failed: %u\n", GetLastError()); + ok(res, "SetFileCompletionNotificationModes failed: %lu\n", GetLastError());
res = DeviceIoControl(file, IOCTL_WINETEST_RESET_CANCEL, NULL, 0, NULL, 0, NULL, &overlapped); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError()); res = GetQueuedCompletionStatus(port, &size, &key, &o, 0); - ok(!res && GetLastError() == WAIT_TIMEOUT, "GetQueuedCompletionStatus returned %x(%u)\n", res, GetLastError()); + ok(!res && GetLastError() == WAIT_TIMEOUT, "GetQueuedCompletionStatus returned %x(%lu)\n", res, GetLastError()); }
CloseHandle(port); @@ -529,24 +529,24 @@ static void test_load_driver(SC_HANDLE service) DWORD sz;
res = QueryServiceStatus(service, &status); - ok(res, "QueryServiceStatusEx failed: %u\n", GetLastError()); - ok(status.dwCurrentState == SERVICE_STOPPED, "got state %#x\n", status.dwCurrentState); + ok(res, "QueryServiceStatusEx failed: %lu\n", GetLastError()); + ok(status.dwCurrentState == SERVICE_STOPPED, "got state %#lx\n", status.dwCurrentState);
load = TRUE; res = DeviceIoControl(device, IOCTL_WINETEST_LOAD_DRIVER, &load, sizeof(load), NULL, 0, &sz, NULL); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError());
res = QueryServiceStatus(service, &status); - ok(res, "QueryServiceStatusEx failed: %u\n", GetLastError()); - ok(status.dwCurrentState == SERVICE_RUNNING, "got state %#x\n", status.dwCurrentState); + ok(res, "QueryServiceStatusEx failed: %lu\n", GetLastError()); + ok(status.dwCurrentState == SERVICE_RUNNING, "got state %#lx\n", status.dwCurrentState);
load = FALSE; res = DeviceIoControl(device, IOCTL_WINETEST_LOAD_DRIVER, &load, sizeof(load), NULL, 0, &sz, NULL); - ok(res, "DeviceIoControl failed: %u\n", GetLastError()); + ok(res, "DeviceIoControl failed: %lu\n", GetLastError());
res = QueryServiceStatus(service, &status); - ok(res, "QueryServiceStatusEx failed: %u\n", GetLastError()); - ok(status.dwCurrentState == SERVICE_STOPPED, "got state %#x\n", status.dwCurrentState); + ok(res, "QueryServiceStatusEx failed: %lu\n", GetLastError()); + ok(status.dwCurrentState == SERVICE_STOPPED, "got state %#lx\n", status.dwCurrentState); }
static void test_file_handles(void) @@ -556,67 +556,67 @@ static void test_file_handles(void) BOOL ret;
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 2, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 2, "got %lu\n", count);
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 1, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 1, "got %lu\n", count);
file = CreateFileA("\\.\WineTestDriver", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open device: %lu\n", GetLastError());
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 3, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 3, "got %lu\n", count);
file2 = CreateFileA("\\.\WineTestDriver", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(file2 != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + ok(file2 != INVALID_HANDLE_VALUE, "failed to open device: %lu\n", GetLastError());
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 4, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 4, "got %lu\n", count);
ret = DuplicateHandle(GetCurrentProcess(), file, GetCurrentProcess(), &dup, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(ret, "failed to duplicate handle: %u\n", GetLastError()); + ok(ret, "failed to duplicate handle: %lu\n", GetLastError());
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 4, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 4, "got %lu\n", count);
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 1, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 1, "got %lu\n", count);
ret = DeviceIoControl(file, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 3, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 3, "got %lu\n", count);
ret = DeviceIoControl(file2, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 4, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 4, "got %lu\n", count);
ret = DeviceIoControl(dup, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 3, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 3, "got %lu\n", count);
CloseHandle(dup);
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 1, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 1, "got %lu\n", count);
CloseHandle(file2);
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 2, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 2, "got %lu\n", count);
CloseHandle(file);
ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); - ok(ret, "ioctl failed: %u\n", GetLastError()); - ok(count == 3, "got %u\n", count); + ok(ret, "ioctl failed: %lu\n", GetLastError()); + ok(count == 3, "got %lu\n", count); }
static unsigned int got_return_status_apc; @@ -625,7 +625,7 @@ static void WINAPI return_status_apc(void *apc_user, IO_STATUS_BLOCK *io, ULONG { ++got_return_status_apc; ok(apc_user == (void *)456, "got %p\n", apc_user); - ok(!reserved, "got reserved %#x\n", reserved); + ok(!reserved, "got reserved %#lx\n", reserved); }
static void do_return_status(ULONG ioctl, struct return_status_params *params) @@ -668,16 +668,16 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) if (NT_SUCCESS(expect_status)) { todo_wine_if (params->ret_status == STATUS_PENDING && params->iosb_status == STATUS_PENDING) - ok(GetLastError() == 0xdeadf00d, "got error %u\n", GetLastError()); + ok(GetLastError() == 0xdeadf00d, "got error %lu\n", GetLastError()); } else { - ok(GetLastError() == RtlNtStatusToDosError(expect_status), "got error %u\n", GetLastError()); + ok(GetLastError() == RtlNtStatusToDosError(expect_status), "got error %lu\n", GetLastError()); } if (NT_ERROR(expect_status)) - ok(size == 0xdeadf00d, "got size %u\n", size); + ok(size == 0xdeadf00d, "got size %lu\n", size); else if (!NT_ERROR(params->iosb_status)) - ok(size == 3, "got size %u\n", size); + ok(size == 3, "got size %lu\n", size); /* size is garbage if !NT_ERROR(expect_status) && NT_ERROR(iosb_status) */ ok(!strcmp(buffer, expect_buffer), "got buffer %s\n", buffer);
@@ -689,12 +689,12 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) ok(ret == expect_status, "got %#x\n", ret); if (NT_ERROR(params->iosb_status)) { - ok(io.Status == 0xdeadf00d, "got %#x\n", io.Status); + ok(io.Status == 0xdeadf00d, "got %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got size %Iu\n", io.Information); } else { - ok(io.Status == params->iosb_status, "got %#x\n", io.Status); + ok(io.Status == params->iosb_status, "got %#lx\n", io.Status); ok(io.Information == 3, "got size %Iu\n", io.Information); } ok(!strcmp(buffer, expect_buffer), "got buffer %s\n", buffer); @@ -703,9 +703,9 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params)
file = CreateFileA("\\.\WineTestDriver", FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed to open device, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open device, error %lu\n", GetLastError()); port = CreateIoCompletionPort(file, NULL, 123, 0); - ok(port != NULL, "failed to create port, error %u\n", GetLastError()); + ok(port != NULL, "failed to create port, error %lu\n", GetLastError());
ret = WaitForSingleObject(file, 0); ok(!ret, "got %d\n", ret); @@ -721,14 +721,14 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) "got %#x\n", ret); if (!params->pending && NT_ERROR(params->iosb_status)) { - ok(io.Status == 0xdeadf00d, "got %#x\n", io.Status); + ok(io.Status == 0xdeadf00d, "got %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got size %Iu\n", io.Information); ret = WaitForSingleObject(event, 0); ok(ret == WAIT_TIMEOUT, "got %d\n", ret); } else { - ok(io.Status == params->iosb_status, "got %#x\n", io.Status); + ok(io.Status == params->iosb_status, "got %#lx\n", io.Status); ok(io.Information == 3, "got size %Iu\n", io.Information); ret = WaitForSingleObject(event, 0); ok(!ret, "got %d\n", ret); @@ -751,7 +751,7 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) ok(!ret, "got %#x\n", ret); ok(key == 123, "got key %Iu\n", key); ok(value == 456, "got value %Iu\n", value); - ok(io.Status == params->iosb_status, "got iosb status %#x\n", io.Status); + ok(io.Status == params->iosb_status, "got iosb status %#lx\n", io.Status); ok(io.Information == 3, "got information %Iu\n", io.Information); }
@@ -768,14 +768,14 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) "got %#x\n", ret); if (!params->pending && NT_ERROR(params->iosb_status)) { - ok(io.Status == 0xdeadf00d, "got %#x\n", io.Status); + ok(io.Status == 0xdeadf00d, "got %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got size %Iu\n", io.Information); ret = WaitForSingleObject(event, 0); ok(ret == WAIT_TIMEOUT, "got %d\n", ret); } else { - ok(io.Status == params->iosb_status, "got %#x\n", io.Status); + ok(io.Status == params->iosb_status, "got %#lx\n", io.Status); ok(io.Information == 3, "got size %Iu\n", io.Information); ret = WaitForSingleObject(event, 0); ok(!ret, "got %d\n", ret); @@ -796,14 +796,14 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) "got %#x\n", ret); if (!params->pending && NT_ERROR(params->iosb_status)) { - ok(io.Status == 0xdeadf00d, "got %#x\n", io.Status); + ok(io.Status == 0xdeadf00d, "got %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got size %Iu\n", io.Information); ret = WaitForSingleObject(file, 0); ok(ret == WAIT_TIMEOUT, "got %d\n", ret); } else { - ok(io.Status == params->iosb_status, "got %#x\n", io.Status); + ok(io.Status == params->iosb_status, "got %#lx\n", io.Status); ok(io.Information == 3, "got size %Iu\n", io.Information); ret = WaitForSingleObject(file, 0); ok(!ret, "got %d\n", ret); @@ -815,7 +815,7 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) if (pSetFileCompletionNotificationModes) { ret = pSetFileCompletionNotificationModes(file, FILE_SKIP_COMPLETION_PORT_ON_SUCCESS); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
SetEvent(event); strcpy(buffer, "abcdef"); @@ -828,14 +828,14 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) "got %#x\n", ret); if (!params->pending && NT_ERROR(params->iosb_status)) { - ok(io.Status == 0xdeadf00d, "got %#x\n", io.Status); + ok(io.Status == 0xdeadf00d, "got %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got size %Iu\n", io.Information); ret = WaitForSingleObject(event, 0); ok(ret == WAIT_TIMEOUT, "got %d\n", ret); } else { - ok(io.Status == params->iosb_status, "got %#x\n", io.Status); + ok(io.Status == params->iosb_status, "got %#lx\n", io.Status); ok(io.Information == 3, "got size %Iu\n", io.Information); ret = WaitForSingleObject(event, 0); ok(!ret, "got %d\n", ret); @@ -866,15 +866,15 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) { ok(key == 123, "got key %Iu\n", key); ok(value == 456, "got value %Iu\n", value); - ok(io.Status == params->iosb_status, "got iosb status %#x\n", io.Status); + ok(io.Status == params->iosb_status, "got iosb status %#lx\n", io.Status); ok(io.Information == 3, "got information %Iu\n", io.Information); } }
ret = CloseHandle(file); - ok(ret, "failed to close file, error %u\n", GetLastError()); + ok(ret, "failed to close file, error %lu\n", GetLastError()); ret = CloseHandle(port); - ok(ret, "failed to close port, error %u\n", GetLastError()); + ok(ret, "failed to close port, error %lu\n", GetLastError());
/* Test with an APC. */
@@ -882,7 +882,7 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params)
file = CreateFileA("\\.\WineTestDriver", FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed to open device, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open device, error %lu\n", GetLastError());
strcpy(buffer, "abcdef"); io.Status = 0xdeadf00d; @@ -892,12 +892,12 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) ok(ret == params->ret_status, "got %#x\n", ret); if (!params->pending && NT_ERROR(params->iosb_status)) { - ok(io.Status == 0xdeadf00d, "got %#x\n", io.Status); + ok(io.Status == 0xdeadf00d, "got %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got size %Iu\n", io.Information); } else { - ok(io.Status == params->iosb_status, "got %#x\n", io.Status); + ok(io.Status == params->iosb_status, "got %#lx\n", io.Status); ok(io.Information == 3, "got size %Iu\n", io.Information); } ok(!strcmp(buffer, expect_buffer), "got buffer %s\n", buffer); @@ -915,7 +915,7 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params) }
ret = CloseHandle(file); - ok(ret, "failed to close file, error %u\n", GetLastError()); + ok(ret, "failed to close file, error %lu\n", GetLastError());
CloseHandle(event); } @@ -956,7 +956,7 @@ static void test_return_status(void) params.ret_status = status_tests[i]; params.iosb_status = status_tests[j];
- winetest_push_context("return 0x%08x, iosb 0x%08x, pending %d, method %u", + winetest_push_context("return 0x%08lx, iosb 0x%08lx, pending %d, method %lu", params.ret_status, params.iosb_status, params.pending, method_tests[k] & 3);
do_return_status(method_tests[k], ¶ms); @@ -986,120 +986,120 @@ static void test_object_info(void) ULONG size;
status = NtQueryObject(device, ObjectNameInformation, buffer, sizeof(buffer), NULL); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(compare_unicode_string(name_info->Name.Buffer, name_info->Name.Length, L"\Device\WineTestDriver"), "wrong name %s\n", debugstr_w(name_info->Name.Buffer));
status = NtQueryObject(device, ObjectTypeInformation, buffer, sizeof(buffer), NULL); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(compare_unicode_string(type_info->TypeName.Buffer, type_info->TypeName.Length, L"File"), "wrong name %s\n", debugstr_wn(type_info->TypeName.Buffer, type_info->TypeName.Length / sizeof(WCHAR)));
status = NtQueryInformationFile(device, &io, buffer, sizeof(buffer), FileNameInformation); - todo_wine ok(status == STATUS_INVALID_DEVICE_REQUEST, "got %#x\n", status); + todo_wine ok(status == STATUS_INVALID_DEVICE_REQUEST, "got %#lx\n", status);
status = NtQueryVolumeInformationFile(device, &io, buffer, sizeof(buffer), FileFsVolumeInformation); - todo_wine ok(status == STATUS_INVALID_DEVICE_REQUEST, "got %#x\n", status); + todo_wine ok(status == STATUS_INVALID_DEVICE_REQUEST, "got %#lx\n", status);
file = CreateFileA("\\.\WineTestDriver\subfile", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError()); if (file == INVALID_HANDLE_VALUE) return;
memset(buffer, 0xcc, sizeof(buffer)); status = NtQueryObject(file, ObjectNameInformation, buffer, sizeof(buffer), &size); - ok(!status, "got %#x\n", status); - ok(size == sizeof(*name_info) + sizeof(L"\Device\WineTestDriver\subfile"), "wrong size %u\n", size); + ok(!status, "got %#lx\n", status); + ok(size == sizeof(*name_info) + sizeof(L"\Device\WineTestDriver\subfile"), "wrong size %lu\n", size); ok(compare_unicode_string(name_info->Name.Buffer, name_info->Name.Length, L"\Device\WineTestDriver\subfile"), "wrong name %s\n", debugstr_w(name_info->Name.Buffer));
memset(buffer, 0xcc, sizeof(buffer)); status = NtQueryObject(file, ObjectNameInformation, buffer, size - 2, &size); - ok(status == STATUS_BUFFER_OVERFLOW, "got %#x\n", status); - ok(size == sizeof(*name_info) + sizeof(L"\Device\WineTestDriver\subfile"), "wrong size %u\n", size); + ok(status == STATUS_BUFFER_OVERFLOW, "got %#lx\n", status); + ok(size == sizeof(*name_info) + sizeof(L"\Device\WineTestDriver\subfile"), "wrong size %lu\n", size); ok(compare_unicode_string(name_info->Name.Buffer, name_info->Name.Length, L"\Device\WineTestDriver\subfil"), "wrong name %s\n", debugstr_w(name_info->Name.Buffer));
memset(buffer, 0xcc, sizeof(buffer)); status = NtQueryObject(file, ObjectNameInformation, buffer, sizeof(*name_info), &size); - ok(status == STATUS_BUFFER_OVERFLOW, "got %#x\n", status); - ok(size == sizeof(*name_info) + sizeof(L"\Device\WineTestDriver\subfile"), "wrong size %u\n", size); + ok(status == STATUS_BUFFER_OVERFLOW, "got %#lx\n", status); + ok(size == sizeof(*name_info) + sizeof(L"\Device\WineTestDriver\subfile"), "wrong size %lu\n", size);
status = NtQueryObject(file, ObjectTypeInformation, buffer, sizeof(buffer), NULL); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(compare_unicode_string(type_info->TypeName.Buffer, type_info->TypeName.Length, L"File"), "wrong name %s\n", debugstr_wn(type_info->TypeName.Buffer, type_info->TypeName.Length / sizeof(WCHAR)));
status = NtQueryInformationFile(file, &io, buffer, sizeof(buffer), FileNameInformation); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(compare_unicode_string(file_info->FileName, file_info->FileNameLength, L"\subfile"), "wrong name %s\n", debugstr_wn(file_info->FileName, file_info->FileNameLength / sizeof(WCHAR)));
io.Status = 0xdeadf00d; io.Information = 0xdeadf00d; status = NtQueryVolumeInformationFile(file, &io, buffer, sizeof(buffer), FileFsVolumeInformation); - ok(!status, "got %#x\n", status); - ok(!io.Status, "got status %#x\n", io.Status); + ok(!status, "got %#lx\n", status); + ok(!io.Status, "got status %#lx\n", io.Status); size = offsetof(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + volume_info->VolumeLabelLength; - ok(io.Information == size, "expected information %Iu, got %Iu\n", size, io.Information); + ok(io.Information == size, "expected information %lu, got %Iu\n", size, io.Information); ok(volume_info->VolumeSerialNumber == 0xdeadbeef, - "wrong serial number 0x%08x\n", volume_info->VolumeSerialNumber); + "wrong serial number 0x%08lx\n", volume_info->VolumeSerialNumber); ok(compare_unicode_string(volume_info->VolumeLabel, volume_info->VolumeLabelLength, L"WineTestDriver"), "wrong name %s\n", debugstr_wn(volume_info->VolumeLabel, volume_info->VolumeLabelLength / sizeof(WCHAR)));
io.Status = 0xdeadf00d; io.Information = 0xdeadf00d; status = NtQueryVolumeInformationFile(file, &io, buffer, sizeof(buffer), FileFsAttributeInformation); - ok(status == STATUS_NOT_IMPLEMENTED, "got %#x\n", status); - ok(io.Status == 0xdeadf00d, "got status %#x\n", io.Status); + ok(status == STATUS_NOT_IMPLEMENTED, "got %#lx\n", status); + ok(io.Status == 0xdeadf00d, "got status %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got information %Iu\n", io.Information);
CloseHandle(file);
file = CreateFileA("\\.\WineTestDriver\notimpl", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryObject(file, ObjectNameInformation, buffer, sizeof(buffer), NULL); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(compare_unicode_string(name_info->Name.Buffer, name_info->Name.Length, L"\Device\WineTestDriver"), "wrong name %s\n", debugstr_w(name_info->Name.Buffer));
status = NtQueryInformationFile(file, &io, buffer, sizeof(buffer), FileNameInformation); - ok(status == STATUS_NOT_IMPLEMENTED, "got %#x\n", status); + ok(status == STATUS_NOT_IMPLEMENTED, "got %#lx\n", status);
CloseHandle(file);
file = CreateFileA("\\.\WineTestDriver\badparam", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryObject(file, ObjectNameInformation, buffer, sizeof(buffer), NULL); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); ok(compare_unicode_string(name_info->Name.Buffer, name_info->Name.Length, L"\Device\WineTestDriver"), "wrong name %s\n", debugstr_w(name_info->Name.Buffer));
status = NtQueryInformationFile(file, &io, buffer, sizeof(buffer), FileNameInformation); - ok(status == STATUS_INVALID_PARAMETER, "got %#x\n", status); + ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status);
CloseHandle(file);
file = CreateFileA("\\.\WineTestDriver\genfail", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryObject(file, ObjectNameInformation, buffer, sizeof(buffer), NULL); - ok(status == STATUS_UNSUCCESSFUL, "got %#x\n", status); + ok(status == STATUS_UNSUCCESSFUL, "got %#lx\n", status);
status = NtQueryInformationFile(file, &io, buffer, sizeof(buffer), FileNameInformation); - ok(status == STATUS_UNSUCCESSFUL, "got %#x\n", status); + ok(status == STATUS_UNSUCCESSFUL, "got %#lx\n", status);
CloseHandle(file);
file = CreateFileA("\\.\WineTestDriver\badtype", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryObject(file, ObjectNameInformation, buffer, sizeof(buffer), NULL); - ok(status == STATUS_OBJECT_TYPE_MISMATCH, "got %#x\n", status); + ok(status == STATUS_OBJECT_TYPE_MISMATCH, "got %#lx\n", status);
status = NtQueryInformationFile(file, &io, buffer, sizeof(buffer), FileNameInformation); - ok(status == STATUS_OBJECT_TYPE_MISMATCH, "got %#x\n", status); + ok(status == STATUS_OBJECT_TYPE_MISMATCH, "got %#lx\n", status);
CloseHandle(file); } @@ -1112,36 +1112,36 @@ static void test_blocking_irp(void) HANDLE file;
file = CreateFileA("\\.\WineTestDriver\", FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open device: %lu\n", GetLastError());
memset(&io, 0xcc, sizeof(io)); status = NtQueryVolumeInformationFile(file, &io, buffer, sizeof(buffer), FileFsSizeInformation); - ok(!status, "got %#x\n", status); - ok(!io.Status, "got iosb status %#x\n", io.Status); + ok(!status, "got %#lx\n", status); + ok(!io.Status, "got iosb status %#lx\n", io.Status); ok(!io.Information, "got information %#Ix\n", io.Information);
io.Status = 0xdeadf00d; io.Information = 0xdeadf00d; status = NtQueryVolumeInformationFile(file, &io, buffer, sizeof(buffer), FileFsFullSizeInformation); - ok(status == STATUS_DEVICE_NOT_READY, "got %#x\n", status); - ok(io.Status == 0xdeadf00d, "got iosb status %#x\n", io.Status); + ok(status == STATUS_DEVICE_NOT_READY, "got %#lx\n", status); + ok(io.Status == 0xdeadf00d, "got iosb status %#lx\n", io.Status); ok(io.Information == 0xdeadf00d, "got information %#Ix\n", io.Information);
CloseHandle(file);
file = CreateFileA("\\.\WineTestDriver\", FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open device: %lu\n", GetLastError());
memset(&io, 0xcc, sizeof(io)); status = NtQueryVolumeInformationFile(file, &io, buffer, sizeof(buffer), FileFsSizeInformation); - ok(!status, "got %#x\n", status); - ok(!io.Status, "got iosb status %#x\n", io.Status); + ok(!status, "got %#lx\n", status); + ok(!io.Status, "got iosb status %#lx\n", io.Status); ok(!io.Information, "got information %#Ix\n", io.Information);
memset(&io, 0xcc, sizeof(io)); status = NtQueryVolumeInformationFile(file, &io, buffer, sizeof(buffer), FileFsFullSizeInformation); - ok(status == STATUS_DEVICE_NOT_READY, "got %#x\n", status); - ok(io.Status == STATUS_DEVICE_NOT_READY, "got iosb status %#x\n", io.Status); + ok(status == STATUS_DEVICE_NOT_READY, "got %#lx\n", status); + ok(io.Status == STATUS_DEVICE_NOT_READY, "got iosb status %#lx\n", io.Status); ok(!io.Information, "got information %#Ix\n", io.Information);
CloseHandle(file); @@ -1161,7 +1161,7 @@ static void test_driver3(struct testsign_context *ctx) ok(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED || GetLastError() == ERROR_INVALID_FUNCTION || GetLastError() == ERROR_PROC_NOT_FOUND /* XP */ || - GetLastError() == ERROR_FILE_NOT_FOUND /* Win7 */, "got %u\n", GetLastError()); + GetLastError() == ERROR_FILE_NOT_FOUND /* Win7 */, "got %lu\n", GetLastError());
DeleteService(service); CloseServiceHandle(service); @@ -1244,7 +1244,7 @@ static void test_driver_netio(struct testsign_context *ctx) }
device = CreateFileA("\\.\winetest_netio", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(device != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + ok(device != INVALID_HANDLE_VALUE, "failed to open device: %lu\n", GetLastError());
hthread = CreateThread(NULL, 0, wsk_test_thread, NULL, 0, NULL); main_test(); @@ -1254,7 +1254,7 @@ static void test_driver_netio(struct testsign_context *ctx)
unload_driver(service); ret = DeleteFileW(filename); - ok(ret, "DeleteFile failed: %u\n", GetLastError()); + ok(ret, "DeleteFile failed: %lu\n", GetLastError());
cat_okfile(); } @@ -1324,7 +1324,7 @@ static void add_file_to_catalog(HANDLE catalog, const WCHAR *file) BOOL ret;
ret = CryptSIPRetrieveSubjectGuidForCatalogFile(file, NULL, &subject_guid); - todo_wine ok(ret, "Failed to get subject guid, error %u\n", GetLastError()); + todo_wine ok(ret, "Failed to get subject guid, error %lu\n", GetLastError());
size = 0; subject_info.pgSubjectType = &subject_guid; @@ -1332,11 +1332,11 @@ static void add_file_to_catalog(HANDLE catalog, const WCHAR *file) subject_info.DigestAlgorithm.pszObjId = (char *)szOID_OIWSEC_sha1; subject_info.dwFlags = SPC_INC_PE_RESOURCES_FLAG | SPC_INC_PE_IMPORT_ADDR_TABLE_FLAG | SPC_EXC_PE_PAGE_HASHES_FLAG | 0x10000; ret = CryptSIPCreateIndirectData(&subject_info, &size, NULL); - todo_wine ok(ret, "Failed to get indirect data size, error %u\n", GetLastError()); + todo_wine ok(ret, "Failed to get indirect data size, error %lu\n", GetLastError());
indirect_data = malloc(size); ret = CryptSIPCreateIndirectData(&subject_info, &size, indirect_data); - todo_wine ok(ret, "Failed to get indirect data, error %u\n", GetLastError()); + todo_wine ok(ret, "Failed to get indirect data, error %lu\n", GetLastError()); if (ret) { memset(hash_buffer, 0, sizeof(hash_buffer)); @@ -1345,7 +1345,7 @@ static void add_file_to_catalog(HANDLE catalog, const WCHAR *file)
member = CryptCATPutMemberInfo(catalog, (WCHAR *)file, hash_buffer, &subject_guid, 0, size, (BYTE *)indirect_data); - ok(!!member, "Failed to write member, error %u\n", GetLastError()); + ok(!!member, "Failed to write member, error %lu\n", GetLastError());
if (wcsrchr(file, '\')) filepart = wcsrchr(file, '\') + 1; @@ -1353,12 +1353,12 @@ static void add_file_to_catalog(HANDLE catalog, const WCHAR *file) ret = !!CryptCATPutAttrInfo(catalog, member, (WCHAR *)L"File", CRYPTCAT_ATTR_NAMEASCII | CRYPTCAT_ATTR_DATAASCII | CRYPTCAT_ATTR_AUTHENTICATED, (wcslen(filepart) + 1) * 2, (BYTE *)filepart); - ok(ret, "Failed to write attr, error %u\n", GetLastError()); + ok(ret, "Failed to write attr, error %lu\n", GetLastError());
ret = !!CryptCATPutAttrInfo(catalog, member, (WCHAR *)L"OSAttr", CRYPTCAT_ATTR_NAMEASCII | CRYPTCAT_ATTR_DATAASCII | CRYPTCAT_ATTR_AUTHENTICATED, sizeof(L"2:6.0"), (BYTE *)L"2:6.0"); - ok(ret, "Failed to write attr, error %u\n", GetLastError()); + ok(ret, "Failed to write attr, error %lu\n", GetLastError()); }
free(indirect_data); @@ -1379,7 +1379,7 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara case DBT_DEVNODES_CHANGED: if (winetest_debug > 1) trace("device nodes changed\n");
- ok(InSendMessageEx(NULL) == ISMEX_NOTIFY, "got message flags %#x\n", InSendMessageEx(NULL)); + ok(InSendMessageEx(NULL) == ISMEX_NOTIFY, "got message flags %#lx\n", InSendMessageEx(NULL)); ok(!lparam, "got lparam %#Ix\n", lparam); break;
@@ -1390,12 +1390,12 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara
if (winetest_debug > 1) trace("device arrival %s\n", iface->dbcc_name);
- ok(InSendMessageEx(NULL) == ISMEX_SEND, "got message flags %#x\n", InSendMessageEx(NULL)); + ok(InSendMessageEx(NULL) == ISMEX_SEND, "got message flags %#lx\n", InSendMessageEx(NULL));
ok(iface->dbcc_devicetype == DBT_DEVTYP_DEVICEINTERFACE, - "got unexpected notification type %#x\n", iface->dbcc_devicetype); - ok(iface->dbcc_size >= expect_size, "expected size at least %u, got %u\n", expect_size, iface->dbcc_size); - ok(!iface->dbcc_reserved, "got reserved %#x\n", iface->dbcc_reserved); + "got unexpected notification type %#lx\n", iface->dbcc_devicetype); + ok(iface->dbcc_size >= expect_size, "expected size at least %lu, got %lu\n", expect_size, iface->dbcc_size); + ok(!iface->dbcc_reserved, "got reserved %#lx\n", iface->dbcc_reserved); if (IsEqualGUID(&iface->dbcc_classguid, &bus_class)) { ++got_bus_arrival; @@ -1418,12 +1418,12 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara
if (winetest_debug > 1) trace("device removal %s\n", iface->dbcc_name);
- ok(InSendMessageEx(NULL) == ISMEX_SEND, "got message flags %#x\n", InSendMessageEx(NULL)); + ok(InSendMessageEx(NULL) == ISMEX_SEND, "got message flags %#lx\n", InSendMessageEx(NULL));
ok(iface->dbcc_devicetype == DBT_DEVTYP_DEVICEINTERFACE, - "got unexpected notification type %#x\n", iface->dbcc_devicetype); - ok(iface->dbcc_size >= expect_size, "expected size at least %u, got %u\n", expect_size, iface->dbcc_size); - ok(!iface->dbcc_reserved, "got reserved %#x\n", iface->dbcc_reserved); + "got unexpected notification type %#lx\n", iface->dbcc_devicetype); + ok(iface->dbcc_size >= expect_size, "expected size at least %lu, got %lu\n", expect_size, iface->dbcc_size); + ok(!iface->dbcc_reserved, "got reserved %#lx\n", iface->dbcc_reserved); if (IsEqualGUID(&iface->dbcc_classguid, &bus_class)) { ++got_bus_removal; @@ -1492,173 +1492,173 @@ static void test_pnp_devices(void) window = CreateWindowA("ntoskrnl_test_wc", NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL); ok(!!window, "failed to create window\n"); notify_handle = RegisterDeviceNotificationA(window, &filter, DEVICE_NOTIFY_ALL_INTERFACE_CLASSES); - ok(!!notify_handle, "failed to register window, error %u\n", GetLastError()); + ok(!!notify_handle, "failed to register window, error %lu\n", GetLastError());
set = SetupDiGetClassDevsA(&control_class, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError());
ret = SetupDiEnumDeviceInfo(set, 0, &device); - ok(ret, "failed to get device, error %#x\n", GetLastError()); + ok(ret, "failed to get device, error %#lx\n", GetLastError()); ok(IsEqualGUID(&device.ClassGuid, &GUID_DEVCLASS_SYSTEM), "wrong class %s\n", debugstr_guid(&device.ClassGuid));
ret = SetupDiGetDeviceInstanceIdA(set, &device, buffer, sizeof(buffer), NULL); - ok(ret, "failed to get device ID, error %#x\n", GetLastError()); + ok(ret, "failed to get device ID, error %#lx\n", GetLastError()); ok(!strcasecmp(buffer, "root\winetest\0"), "got ID %s\n", debugstr_a(buffer));
ret = SetupDiEnumDeviceInterfaces(set, NULL, &control_class, 0, &iface); - ok(ret, "failed to get interface, error %#x\n", GetLastError()); + ok(ret, "failed to get interface, error %#lx\n", GetLastError()); ok(IsEqualGUID(&iface.InterfaceClassGuid, &control_class), "wrong class %s\n", debugstr_guid(&iface.InterfaceClassGuid)); - ok(iface.Flags == SPINT_ACTIVE, "got flags %#x\n", iface.Flags); + ok(iface.Flags == SPINT_ACTIVE, "got flags %#lx\n", iface.Flags);
iface_detail->cbSize = sizeof(*iface_detail); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, iface_detail, sizeof(buffer), NULL, NULL); - ok(ret, "failed to get interface path, error %#x\n", GetLastError()); + ok(ret, "failed to get interface path, error %#lx\n", GetLastError()); ok(!strcasecmp(iface_detail->DevicePath, "\\?\root#winetest#0#{deadbeef-29ef-4538-a5fd-b69573a362c0}"), "wrong path %s\n", debugstr_a(iface_detail->DevicePath));
SetupDiDestroyDeviceInfoList(set);
bus = CreateFileA(iface_detail->DevicePath, 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(bus != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(bus != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
ret = DeviceIoControl(bus, IOCTL_WINETEST_BUS_MAIN, NULL, 0, NULL, 0, &size, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
/* Test IoRegisterDeviceInterface() and IoSetDeviceInterfaceState(). */
set = SetupDiGetClassDevsA(&bus_class, NULL, NULL, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError()); ret = SetupDiEnumDeviceInterfaces(set, NULL, &bus_class, 0, &iface); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, "got error %#x\n", GetLastError()); + ok(GetLastError() == ERROR_NO_MORE_ITEMS, "got error %#lx\n", GetLastError()); SetupDiDestroyDeviceInfoList(set);
ret = DeviceIoControl(bus, IOCTL_WINETEST_BUS_REGISTER_IFACE, NULL, 0, NULL, 0, &size, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
set = SetupDiGetClassDevsA(&bus_class, NULL, NULL, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError()); ret = SetupDiEnumDeviceInterfaces(set, NULL, &bus_class, 0, &iface); - ok(ret, "failed to get interface, error %#x\n", GetLastError()); + ok(ret, "failed to get interface, error %#lx\n", GetLastError()); ok(IsEqualGUID(&iface.InterfaceClassGuid, &bus_class), "wrong class %s\n", debugstr_guid(&iface.InterfaceClassGuid)); - ok(!iface.Flags, "got flags %#x\n", iface.Flags); + ok(!iface.Flags, "got flags %#lx\n", iface.Flags); SetupDiDestroyDeviceInfoList(set);
set = SetupDiGetClassDevsA(&bus_class, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError()); ret = SetupDiEnumDeviceInterfaces(set, NULL, &bus_class, 0, &iface); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, "got error %#x\n", GetLastError()); + ok(GetLastError() == ERROR_NO_MORE_ITEMS, "got error %#lx\n", GetLastError()); SetupDiDestroyDeviceInfoList(set);
ret = DeviceIoControl(bus, IOCTL_WINETEST_BUS_ENABLE_IFACE, NULL, 0, NULL, 0, &size, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
pump_messages(); ok(got_bus_arrival == 1, "got %u bus arrival messages\n", got_bus_arrival); ok(!got_bus_removal, "got %u bus removal messages\n", got_bus_removal);
set = SetupDiGetClassDevsA(&bus_class, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError()); ret = SetupDiEnumDeviceInterfaces(set, NULL, &bus_class, 0, &iface); - ok(ret, "failed to get interface, error %#x\n", GetLastError()); + ok(ret, "failed to get interface, error %#lx\n", GetLastError()); ok(IsEqualGUID(&iface.InterfaceClassGuid, &bus_class), "wrong class %s\n", debugstr_guid(&iface.InterfaceClassGuid)); - ok(iface.Flags == SPINT_ACTIVE, "got flags %#x\n", iface.Flags); + ok(iface.Flags == SPINT_ACTIVE, "got flags %#lx\n", iface.Flags); SetupDiDestroyDeviceInfoList(set);
ret = DeviceIoControl(bus, IOCTL_WINETEST_BUS_DISABLE_IFACE, NULL, 0, NULL, 0, &size, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
pump_messages(); ok(got_bus_arrival == 1, "got %u bus arrival messages\n", got_bus_arrival); ok(got_bus_removal == 1, "got %u bus removal messages\n", got_bus_removal);
set = SetupDiGetClassDevsA(&bus_class, NULL, NULL, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError()); ret = SetupDiEnumDeviceInterfaces(set, NULL, &bus_class, 0, &iface); - ok(ret, "failed to get interface, error %#x\n", GetLastError()); + ok(ret, "failed to get interface, error %#lx\n", GetLastError()); ok(IsEqualGUID(&iface.InterfaceClassGuid, &bus_class), "wrong class %s\n", debugstr_guid(&iface.InterfaceClassGuid)); - ok(!iface.Flags, "got flags %#x\n", iface.Flags); + ok(!iface.Flags, "got flags %#lx\n", iface.Flags); SetupDiDestroyDeviceInfoList(set);
set = SetupDiGetClassDevsA(&bus_class, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError()); ret = SetupDiEnumDeviceInterfaces(set, NULL, &bus_class, 0, &iface); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, "got error %#x\n", GetLastError()); + ok(GetLastError() == ERROR_NO_MORE_ITEMS, "got error %#lx\n", GetLastError()); SetupDiDestroyDeviceInfoList(set);
/* Test exposing a child device. */
id = 1; ret = DeviceIoControl(bus, IOCTL_WINETEST_BUS_ADD_CHILD, &id, sizeof(id), NULL, 0, &size, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
pump_messages(); ok(got_child_arrival == 1, "got %u child arrival messages\n", got_child_arrival); ok(!got_child_removal, "got %u child removal messages\n", got_child_removal);
set = SetupDiGetClassDevsA(&child_class, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError());
ret = SetupDiEnumDeviceInfo(set, 0, &device); - ok(ret, "failed to get device, error %#x\n", GetLastError()); + ok(ret, "failed to get device, error %#lx\n", GetLastError()); ok(IsEqualGUID(&device.ClassGuid, &GUID_NULL), "wrong class %s\n", debugstr_guid(&device.ClassGuid));
ret = SetupDiGetDeviceInstanceIdA(set, &device, buffer, sizeof(buffer), NULL); - ok(ret, "failed to get device ID, error %#x\n", GetLastError()); + ok(ret, "failed to get device ID, error %#lx\n", GetLastError()); ok(!strcasecmp(buffer, "wine\test\1"), "got ID %s\n", debugstr_a(buffer));
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CAPABILITIES, &type, (BYTE *)&dword, sizeof(dword), NULL); - todo_wine ok(ret, "got error %#x\n", GetLastError()); + todo_wine ok(ret, "got error %#lx\n", GetLastError()); if (ret) { ok(dword == (CM_DEVCAP_EJECTSUPPORTED | CM_DEVCAP_UNIQUEID - | CM_DEVCAP_RAWDEVICEOK | CM_DEVCAP_SURPRISEREMOVALOK), "got flags %#x\n", dword); - ok(type == REG_DWORD, "got type %u\n", type); + | CM_DEVCAP_RAWDEVICEOK | CM_DEVCAP_SURPRISEREMOVALOK), "got flags %#lx\n", dword); + ok(type == REG_DWORD, "got type %lu\n", type); }
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CLASSGUID, &type, (BYTE *)buffer, sizeof(buffer), NULL); todo_wine ok(!ret, "expected failure\n"); if (ret) - ok(GetLastError() == ERROR_INVALID_DATA, "got error %#x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError());
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVTYPE, &type, (BYTE *)&dword, sizeof(dword), NULL); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "got error %#x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError());
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DRIVER, &type, (BYTE *)buffer, sizeof(buffer), NULL); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "got error %#x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError());
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_HARDWAREID, &type, (BYTE *)buffer, sizeof(buffer), &size); - ok(ret, "got error %#x\n", GetLastError()); - ok(type == REG_MULTI_SZ, "got type %u\n", type); - ok(size == sizeof(expect_hardware_id), "got size %u\n", size); + ok(ret, "got error %#lx\n", GetLastError()); + ok(type == REG_MULTI_SZ, "got type %lu\n", type); + ok(size == sizeof(expect_hardware_id), "got size %lu\n", size); ok(!memcmp(buffer, expect_hardware_id, size), "got hardware IDs %s\n", debugstr_an(buffer, size));
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_COMPATIBLEIDS, &type, (BYTE *)buffer, sizeof(buffer), &size); - ok(ret, "got error %#x\n", GetLastError()); - ok(type == REG_MULTI_SZ, "got type %u\n", type); - ok(size == sizeof(expect_compat_id), "got size %u\n", size); + ok(ret, "got error %#lx\n", GetLastError()); + ok(type == REG_MULTI_SZ, "got type %lu\n", type); + ok(size == sizeof(expect_compat_id), "got size %lu\n", size); ok(!memcmp(buffer, expect_compat_id, size), "got compatible IDs %s\n", debugstr_an(buffer, size));
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_PHYSICAL_DEVICE_OBJECT_NAME, &type, (BYTE *)buffer, sizeof(buffer), NULL); - todo_wine ok(ret, "got error %#x\n", GetLastError()); + todo_wine ok(ret, "got error %#lx\n", GetLastError()); if (ret) { - ok(type == REG_SZ, "got type %u\n", type); + ok(type == REG_SZ, "got type %lu\n", type); ok(!strcmp(buffer, "\Device\winetest_pnp_1"), "got PDO name %s\n", debugstr_a(buffer)); }
@@ -1671,9 +1671,9 @@ static void test_pnp_devices(void)
id = 0xdeadbeef; ret = DeviceIoControl(child, IOCTL_WINETEST_CHILD_GET_ID, NULL, 0, &id, sizeof(id), &size, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(id == 1, "got id %d\n", id); - ok(size == sizeof(id), "got size %u\n", size); + ok(size == sizeof(id), "got size %lu\n", size);
CloseHandle(child);
@@ -1682,27 +1682,27 @@ static void test_pnp_devices(void)
ret = DeviceIoControl(child, IOCTL_WINETEST_CHILD_MARK_PENDING, NULL, 0, NULL, 0, &size, &ovl); ok(!ret, "DeviceIoControl succeeded\n"); - ok(GetLastError() == ERROR_IO_PENDING, "got error %u\n", GetLastError()); - ok(size == 0, "got size %u\n", size); + ok(GetLastError() == ERROR_IO_PENDING, "got error %lu\n", GetLastError()); + ok(size == 0, "got size %lu\n", size);
id = 1; ret = DeviceIoControl(bus, IOCTL_WINETEST_BUS_REMOVE_CHILD, &id, sizeof(id), NULL, 0, &size, NULL); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
pump_messages(); ok(got_child_arrival == 1, "got %u child arrival messages\n", got_child_arrival); ok(got_child_removal == 1, "got %u child removal messages\n", got_child_removal);
ret = DeviceIoControl(child, IOCTL_WINETEST_CHILD_CHECK_REMOVED, NULL, 0, NULL, 0, &size, NULL); - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
ret = NtOpenFile(&tmp, SYNCHRONIZE, &attr, &io, 0, FILE_SYNCHRONOUS_IO_NONALERT); todo_wine ok(ret == STATUS_NO_SUCH_DEVICE, "got %#x\n", ret);
ret = GetOverlappedResult(child, &ovl, &size, TRUE); ok(!ret, "unexpected success.\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); - ok(size == 0, "got size %u\n", size); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError()); + ok(size == 0, "got size %lu\n", size);
CloseHandle(child);
@@ -1740,7 +1740,7 @@ static void test_pnp_driver(struct testsign_context *ctx)
load_resource(L"driver_pnp.dll", driver_filename); ret = MoveFileExW(driver_filename, L"winetest.sys", MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING); - ok(ret, "failed to move file, error %u\n", GetLastError()); + ok(ret, "failed to move file, error %lu\n", GetLastError());
f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno)); @@ -1750,47 +1750,47 @@ static void test_pnp_driver(struct testsign_context *ctx) /* Create the catalog file. */
catalog = CryptCATOpen((WCHAR *)L"winetest.cat", CRYPTCAT_OPEN_CREATENEW, 0, CRYPTCAT_VERSION_1, 0); - ok(catalog != INVALID_HANDLE_VALUE, "Failed to create catalog, error %#x\n", GetLastError()); + ok(catalog != INVALID_HANDLE_VALUE, "Failed to create catalog, error %#lx\n", GetLastError());
ret = !!CryptCATPutCatAttrInfo(catalog, (WCHAR *)L"HWID1", CRYPTCAT_ATTR_NAMEASCII | CRYPTCAT_ATTR_DATAASCII | CRYPTCAT_ATTR_AUTHENTICATED, sizeof(L"test_hardware_id"), (BYTE *)L"test_hardware_id"); - todo_wine ok(ret, "failed to add attribute, error %#x\n", GetLastError()); + todo_wine ok(ret, "failed to add attribute, error %#lx\n", GetLastError());
ret = !!CryptCATPutCatAttrInfo(catalog, (WCHAR *)L"OS", CRYPTCAT_ATTR_NAMEASCII | CRYPTCAT_ATTR_DATAASCII | CRYPTCAT_ATTR_AUTHENTICATED, sizeof(L"VistaX64"), (BYTE *)L"VistaX64"); - todo_wine ok(ret, "failed to add attribute, error %#x\n", GetLastError()); + todo_wine ok(ret, "failed to add attribute, error %#lx\n", GetLastError());
add_file_to_catalog(catalog, L"winetest.sys"); add_file_to_catalog(catalog, L"winetest.inf");
ret = CryptCATPersistStore(catalog); - todo_wine ok(ret, "Failed to write catalog, error %u\n", GetLastError()); + todo_wine ok(ret, "Failed to write catalog, error %lu\n", GetLastError());
ret = CryptCATClose(catalog); - ok(ret, "Failed to close catalog, error %u\n", GetLastError()); + ok(ret, "Failed to close catalog, error %lu\n", GetLastError());
testsign_sign(ctx, L"winetest.cat");
/* Install the driver. */
set = SetupDiCreateDeviceInfoList(NULL, NULL); - ok(set != INVALID_HANDLE_VALUE, "failed to create device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to create device list, error %#lx\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "root\winetest\0", &GUID_NULL, NULL, NULL, 0, &device); - ok(ret, "failed to create device, error %#x\n", GetLastError()); + ok(ret, "failed to create device, error %#lx\n", GetLastError());
ret = SetupDiSetDeviceRegistryPropertyA( set, &device, SPDRP_HARDWAREID, (const BYTE *)hardware_id, sizeof(hardware_id) ); - ok(ret, "failed to create set hardware ID, error %#x\n", GetLastError()); + ok(ret, "failed to create set hardware ID, error %#lx\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); - ok(ret, "failed to register device, error %#x\n", GetLastError()); + ok(ret, "failed to register device, error %#lx\n", GetLastError());
GetFullPathNameA("winetest.inf", sizeof(path), path, NULL); ret = UpdateDriverForPlugAndPlayDevicesA(NULL, hardware_id, path, INSTALLFLAG_FORCE, &need_reboot); - ok(ret, "failed to install device, error %#x\n", GetLastError()); + ok(ret, "failed to install device, error %#lx\n", GetLastError()); ok(!need_reboot, "expected no reboot necessary\n");
/* Tests. */ @@ -1800,31 +1800,31 @@ static void test_pnp_driver(struct testsign_context *ctx) /* Clean up. */
ret = SetupDiCallClassInstaller(DIF_REMOVE, set, &device); - ok(ret, "failed to remove device, error %#x\n", GetLastError()); + ok(ret, "failed to remove device, error %#lx\n", GetLastError());
file = CreateFileA("\\?\root#winetest#0#{deadbeef-29ef-4538-a5fd-b69573a362c0}", 0, 0, NULL, OPEN_EXISTING, 0, NULL); ok(file == INVALID_HANDLE_VALUE, "expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %lu\n", GetLastError());
ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "failed to destroy set, error %#x\n", GetLastError()); + ok(ret, "failed to destroy set, error %#lx\n", GetLastError());
set = SetupDiGetClassDevsA(NULL, "wine", NULL, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#lx\n", GetLastError());
for (i = 0; SetupDiEnumDeviceInfo(set, i, &device); ++i) { ret = SetupDiCallClassInstaller(DIF_REMOVE, set, &device); - ok(ret, "failed to remove device, error %#x\n", GetLastError()); + ok(ret, "failed to remove device, error %#lx\n", GetLastError()); }
SetupDiDestroyDeviceInfoList(set);
/* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - ok(!!manager, "failed to open service manager, error %u\n", GetLastError()); + ok(!!manager, "failed to open service manager, error %lu\n", GetLastError()); service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE); - ok(!!service, "failed to open service, error %u\n", GetLastError()); + ok(!!service, "failed to open service, error %lu\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager);
@@ -1832,19 +1832,19 @@ static void test_pnp_driver(struct testsign_context *ctx)
GetFullPathNameA("winetest.inf", sizeof(path), path, NULL); ret = SetupCopyOEMInfA(path, NULL, 0, 0, dest, sizeof(dest), NULL, &filepart); - ok(ret, "Failed to copy INF, error %#x\n", GetLastError()); + ok(ret, "Failed to copy INF, error %#lx\n", GetLastError()); ret = SetupUninstallOEMInfA(filepart, 0, NULL); - ok(ret, "Failed to uninstall INF, error %u\n", GetLastError()); + ok(ret, "Failed to uninstall INF, error %lu\n", GetLastError());
ret = DeleteFileA("winetest.cat"); - ok(ret, "Failed to delete file, error %u\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu\n", GetLastError()); ret = DeleteFileA("winetest.inf"); - ok(ret, "Failed to delete file, error %u\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu\n", GetLastError()); ret = DeleteFileA("winetest.sys"); - ok(ret, "Failed to delete file, error %u\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu\n", GetLastError()); /* Windows 10 apparently deletes the image in SetupUninstallOEMInf(). */ ret = DeleteFileA("C:/windows/system32/drivers/winetest.sys"); - ok(ret || GetLastError() == ERROR_FILE_NOT_FOUND, "Failed to delete file, error %u\n", GetLastError()); + ok(ret || GetLastError() == ERROR_FILE_NOT_FOUND, "Failed to delete file, error %lu\n", GetLastError());
SetCurrentDirectoryA(cwd); } @@ -1877,7 +1877,7 @@ START_TEST(ntoskrnl)
mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(*test_data), "Global\winetest_ntoskrnl_section"); - ok(!!mapping, "got error %u\n", GetLastError()); + ok(!!mapping, "got error %lu\n", GetLastError()); test_data = MapViewOfFile(mapping, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 1024); test_data->running_under_wine = !strcmp(winetest_platform, "wine"); test_data->winetest_report_success = winetest_report_success; @@ -1885,7 +1885,7 @@ START_TEST(ntoskrnl)
okfile = CreateFileA("C:\windows\winetest_ntoskrnl_okfile", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, NULL); - ok(okfile != INVALID_HANDLE_VALUE, "failed to create file, error %u\n", GetLastError()); + ok(okfile != INVALID_HANDLE_VALUE, "failed to create file, error %lu\n", GetLastError());
subtest("driver"); if (!(service = load_driver(&ctx, filename, L"driver.dll", L"WineTestDriver"))) @@ -1899,7 +1899,7 @@ START_TEST(ntoskrnl) service2 = load_driver(&ctx, filename2, L"driver2.dll", L"WineTestDriver2");
device = CreateFileA("\\.\WineTestDriver", 0, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(device != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + ok(device != INVALID_HANDLE_VALUE, "failed to open device: %lu\n", GetLastError());
test_basic_ioctl();
@@ -1916,16 +1916,16 @@ START_TEST(ntoskrnl) /* We need a separate ioctl to call IoDetachDevice(); calling it in the * driver unload routine causes a live-lock. */ ret = DeviceIoControl(device, IOCTL_WINETEST_DETACH, NULL, 0, NULL, 0, &written, NULL); - ok(ret, "DeviceIoControl failed: %u\n", GetLastError()); + ok(ret, "DeviceIoControl failed: %lu\n", GetLastError());
CloseHandle(device);
unload_driver(service2); unload_driver(service); ret = DeleteFileW(filename); - ok(ret, "DeleteFile failed: %u\n", GetLastError()); + ok(ret, "DeleteFile failed: %lu\n", GetLastError()); ret = DeleteFileW(filename2); - ok(ret, "DeleteFile failed: %u\n", GetLastError()); + ok(ret, "DeleteFile failed: %lu\n", GetLastError());
cat_okfile();
diff --git a/dlls/ntoskrnl.exe/tests/utils.h b/dlls/ntoskrnl.exe/tests/utils.h index fc675e17dd0..aaf96fab616 100644 --- a/dlls/ntoskrnl.exe/tests/utils.h +++ b/dlls/ntoskrnl.exe/tests/utils.h @@ -189,7 +189,7 @@ static inline void winetest_cleanup(void)
if (winetest_debug) { - kprintf("%04x:ntoskrnl: %d tests executed (%d marked as todo, %d %s), %d skipped.\n", + kprintf("%04lx:ntoskrnl: %ld tests executed (%ld marked as todo, %ld %s), %ld skipped.\n", (DWORD)(DWORD_PTR)PsGetCurrentProcessId(), successes + failures + todo_successes + todo_failures, todo_successes, failures + todo_failures, (failures + todo_failures != 1) ? "failures" : "failure", skipped );
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ntprint/tests/ntprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntprint/tests/ntprint.c b/dlls/ntprint/tests/ntprint.c index 57caa49ab27..7e27c1ce58b 100644 --- a/dlls/ntprint/tests/ntprint.c +++ b/dlls/ntprint/tests/ntprint.c @@ -67,7 +67,7 @@ static void test_PSetupCreateMonitorInfo(VOID) { HANDLE mi; WCHAR buffer[1024] = {'\','\'}; - UINT len = ARRAY_SIZE(buffer) - 2; + DWORD len = ARRAY_SIZE(buffer) - 2; GetComputerNameW(buffer + 2, &len);
SetLastError(0xdeadbeef);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ntprint/tests/Makefile.in | 1 - dlls/ntprint/tests/ntprint.c | 32 ++++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/dlls/ntprint/tests/Makefile.in b/dlls/ntprint/tests/Makefile.in index 94a1d9192c6..0c1793fe9e8 100644 --- a/dlls/ntprint/tests/Makefile.in +++ b/dlls/ntprint/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ntprint.dll
C_SRCS = \ diff --git a/dlls/ntprint/tests/ntprint.c b/dlls/ntprint/tests/ntprint.c index 7e27c1ce58b..e877b4df1f1 100644 --- a/dlls/ntprint/tests/ntprint.c +++ b/dlls/ntprint/tests/ntprint.c @@ -76,19 +76,19 @@ static void test_PSetupCreateMonitorInfo(VOID) win_skip("The service 'Spooler' is required for many tests\n"); return; } - ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); + ok( mi != NULL, "got %p with %lu (expected '!= NULL')\n", mi, GetLastError()); if (mi) pPSetupDestroyMonitorInfo(mi);
SetLastError(0xdeadbeef); mi = pPSetupCreateMonitorInfo(0, buffer); - ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); + ok( mi != NULL, "got %p with %lu (expected '!= NULL')\n", mi, GetLastError()); if (mi) pPSetupDestroyMonitorInfo(mi);
SetLastError(0xdeadbeef); mi = pPSetupCreateMonitorInfo(0, buffer + 1); todo_wine { ok( mi == NULL, "got %p\n", mi ); - ok( GetLastError() == ERROR_INVALID_NAME, "got %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_NAME, "got %ld\n", GetLastError() ); } if (mi) pPSetupDestroyMonitorInfo(mi); } @@ -103,7 +103,7 @@ static void test_PSetupDestroyMonitorInfo(VOID) SetLastError(0xdeadbeef); pPSetupDestroyMonitorInfo(NULL); /* lasterror is returned */ - trace("returned with %u\n", GetLastError()); + trace("returned with %lu\n", GetLastError());
SetLastError(0xdeadbeef); mi = pPSetupCreateMonitorInfo(0, NULL); @@ -111,20 +111,20 @@ static void test_PSetupDestroyMonitorInfo(VOID) win_skip("The service 'Spooler' is required for many tests\n"); return; } - ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); + ok( mi != NULL, "got %p with %lu (expected '!= NULL')\n", mi, GetLastError());
if (!mi) return;
SetLastError(0xdeadbeef); pPSetupDestroyMonitorInfo(mi); /* lasterror is returned */ - trace("returned with %u\n", GetLastError()); + trace("returned with %lu\n", GetLastError());
/* Trying to destroy the handle twice crashes with native ntprint.dll */ if (0) { SetLastError(0xdeadbeef); pPSetupDestroyMonitorInfo(mi); - trace(" with %u\n", GetLastError()); + trace(" with %lu\n", GetLastError()); }
} @@ -151,13 +151,13 @@ static void test_PSetupEnumMonitor(VOID) SetLastError(0xdeadbeef); res = pPSetupEnumMonitor(mi, 0, NULL, &minsize); ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER) && (minsize > 0), - "got %u with %u and %u (expected '0' with ERROR_INSUFFICIENT_BUFFER " + "got %lu with %lu and %lu (expected '0' with ERROR_INSUFFICIENT_BUFFER " "and '> 0')\n", res, GetLastError(), minsize);
size = ARRAY_SIZE(buffer); if ((minsize + 1) > size) { - skip("overflow: %u\n", minsize); + skip("overflow: %lu\n", minsize); pPSetupDestroyMonitorInfo(mi); return; } @@ -168,7 +168,7 @@ static void test_PSetupEnumMonitor(VOID) size = ARRAY_SIZE(buffer); res = pPSetupEnumMonitor(NULL, 0, buffer, &size); ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", + "got %lu with %lu (expected '0' with ERROR_INVALID_PARAMETER)\n", res, GetLastError()); }
@@ -177,7 +177,7 @@ static void test_PSetupEnumMonitor(VOID) SetLastError(0xdeadbeef); size = ARRAY_SIZE(buffer); res = pPSetupEnumMonitor(mi, 0, NULL, &size); - trace("got %u with %u and %u\n", res, GetLastError(), size); + trace("got %lu with %lu and %lu\n", res, GetLastError(), size); }
if (0) { @@ -185,7 +185,7 @@ static void test_PSetupEnumMonitor(VOID) SetLastError(0xdeadbeef); res = pPSetupEnumMonitor(mi, 0, buffer, NULL); ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", + "got %lu with %lu (expected '0' with ERROR_INVALID_PARAMETER)\n", res, GetLastError()); }
@@ -193,20 +193,20 @@ static void test_PSetupEnumMonitor(VOID) size = minsize - 1; res = pPSetupEnumMonitor(mi, 0, buffer, &size); ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "got %u with %u and %u (expected '0' with ERROR_INSUFFICIENT_BUFFER)\n", + "got %lu with %lu and %lu (expected '0' with ERROR_INSUFFICIENT_BUFFER)\n", res, GetLastError(), size);
SetLastError(0xdeadbeef); size = minsize; res = pPSetupEnumMonitor(mi, 0, buffer, &size); - ok( res, "got %u with %u and %u (expected '!= 0')\n", + ok( res, "got %lu with %lu and %lu (expected '!= 0')\n", res, GetLastError(), size);
SetLastError(0xdeadbeef); size = minsize + 1; res = pPSetupEnumMonitor(mi, 0, buffer, &size); - ok( res, "got %u with %u and %u (expected '!= 0')\n", + ok( res, "got %lu with %lu and %lu (expected '!= 0')\n", res, GetLastError(), size);
/* try max. 20 monitors */ @@ -216,7 +216,7 @@ static void test_PSetupEnumMonitor(VOID) size = ARRAY_SIZE(buffer); res = pPSetupEnumMonitor(mi, index, buffer, &size); ok( res || (GetLastError() == ERROR_NO_MORE_ITEMS), - "(%u) got %u with %u and %u (expected '!=0' or: '0' with " + "(%lu) got %lu with %lu and %lu (expected '!=0' or: '0' with " "ERROR_NO_MORE_ITEMS)\n", index, res, GetLastError(), size);
if (res) index++;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/odbccp32/tests/Makefile.in | 1 - dlls/odbccp32/tests/misc.c | 74 ++++++++++++++++++++------------------- 2 files changed, 37 insertions(+), 38 deletions(-)
diff --git a/dlls/odbccp32/tests/Makefile.in b/dlls/odbccp32/tests/Makefile.in index 683633fb58a..c65292e12d2 100644 --- a/dlls/odbccp32/tests/Makefile.in +++ b/dlls/odbccp32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = odbccp32.dll IMPORTS = odbccp32 advapi32
diff --git a/dlls/odbccp32/tests/misc.c b/dlls/odbccp32/tests/misc.c index ec706f57f06..3b812b77726 100644 --- a/dlls/odbccp32/tests/misc.c +++ b/dlls/odbccp32/tests/misc.c @@ -33,7 +33,7 @@ static void check_error_(int line, DWORD expect) DWORD err; ret = SQLInstallerError(1, &err, NULL, 0, NULL); ok_(__FILE__, line)(ret == SQL_SUCCESS_WITH_INFO, "got %d\n", ret); - ok_(__FILE__, line)(err == expect, "expected %u, got %u\n", expect, ret); + ok_(__FILE__, line)(err == expect, "expected %lu, got %u\n", expect, ret); } #define check_error(a) check_error_(__LINE__, a)
@@ -126,7 +126,7 @@ static void test_SQLInstallDriverManager(void) win_skip("not enough privileges\n"); return; } - ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %d\n", + ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %ld\n", error_code); if (bool_ret) ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret); @@ -137,7 +137,7 @@ static void test_SQLInstallDriverManager(void) path_out = 0xcafe; bool_ret = SQLInstallDriverManager(target_path, MAX_PATH, &path_out); sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %d\n", + ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %ld\n", error_code); if (bool_ret) ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret); @@ -158,12 +158,12 @@ static void test_SQLWritePrivateProfileString(void) ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value", ""); ok(!ret, "SQLWritePrivateProfileString passed\n"); SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(error_code == ODBC_ERROR_INVALID_STR, "SQLInstallerErrorW ret: %d\n", error_code); + ok(error_code == ODBC_ERROR_INVALID_STR, "SQLInstallerErrorW ret: %ld\n", error_code);
ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value", NULL); ok(!ret, "SQLWritePrivateProfileString passed\n"); SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(error_code == ODBC_ERROR_INVALID_STR, "SQLInstallerErrorW ret: %d\n", error_code); + ok(error_code == ODBC_ERROR_INVALID_STR, "SQLInstallerErrorW ret: %ld\n", error_code);
ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value", "odbc.ini"); ok(ret, "SQLWritePrivateProfileString failed\n"); @@ -440,7 +440,7 @@ static void test_SQLInstallDriverEx(void) ret = SQLConfigDriver(NULL, ODBC_CONFIG_DRIVER, "WINE ODBC Driver", "CPTimeout=59", error, sizeof(error), NULL); ok(!ret, "SQLConfigDriver returned %d\n", ret); sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(sql_ret && error_code == ODBC_ERROR_COMPONENT_NOT_FOUND, "SQLConfigDriver returned %d, %u\n", sql_ret, error_code); + ok(sql_ret && error_code == ODBC_ERROR_COMPONENT_NOT_FOUND, "SQLConfigDriver returned %d, %lu\n", sql_ret, error_code);
ret = SQLInstallDriverEx("WINE ODBC Driver\0Driver=sample.dll\0Setup=sample.dll\0\0", NULL, path, MAX_PATH, &size, ODBC_INSTALL_COMPLETE, NULL); @@ -451,7 +451,7 @@ static void test_SQLInstallDriverEx(void) win_skip("not enough privileges\n"); return; } - ok(sql_ret == SQL_NO_DATA || (sql_ret && error_code == SQL_SUCCESS), "SQLInstallDriverEx failed %d, %u\n", sql_ret, error_code); + ok(sql_ret == SQL_NO_DATA || (sql_ret && error_code == SQL_SUCCESS), "SQLInstallDriverEx failed %d, %lu\n", sql_ret, error_code); ok(!strcmp(path, syspath), "invalid path %s\n", path);
if (0) /* Crashes on XP. */ @@ -464,23 +464,23 @@ if (0) /* Crashes on XP. */ ret = SQLConfigDriver(NULL, ODBC_CONFIG_DRIVER, "WINE ODBC Driver", "CPTimeout=59\0NoWrite=60\0", error, sizeof(error), NULL); ok(ret, "SQLConfigDriver failed\n"); sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(sql_ret == SQL_NO_DATA || (sql_ret && error_code == SQL_SUCCESS), "SQLConfigDriver failed %d, %u\n", sql_ret, error_code); + ok(sql_ret == SQL_NO_DATA || (sql_ret && error_code == SQL_SUCCESS), "SQLConfigDriver failed %d, %lu\n", sql_ret, error_code);
ret = SQLInstallDriverEx("WINE ODBC Driver Path\0Driver=sample.dll\0Setup=sample.dll\0\0", "c:\temp", path, MAX_PATH, &size, ODBC_INSTALL_COMPLETE, NULL); ok(ret, "SQLInstallDriverEx failed\n"); sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(sql_ret == SQL_NO_DATA || (sql_ret && error_code == SQL_SUCCESS), "SQLInstallDriverEx failed %d, %u\n", sql_ret, error_code); + ok(sql_ret == SQL_NO_DATA || (sql_ret && error_code == SQL_SUCCESS), "SQLInstallDriverEx failed %d, %lu\n", sql_ret, error_code); ok(!strcmp(path, "c:\temp"), "invalid path %s\n", path);
ret = SQLConfigDriver(NULL, ODBC_CONFIG_DRIVER, "WINE ODBC Driver Path", "empty", error, sizeof(error), NULL); ok(!ret, "SQLConfigDriver successful\n"); sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(sql_ret && error_code == ODBC_ERROR_INVALID_KEYWORD_VALUE, "SQLConfigDriver failed %d, %u\n", sql_ret, error_code); + ok(sql_ret && error_code == ODBC_ERROR_INVALID_KEYWORD_VALUE, "SQLConfigDriver failed %d, %lu\n", sql_ret, error_code);
ret = SQLConfigDriver(NULL, ODBC_CONFIG_DRIVER, "WINE ODBC Driver Path", "NoWrite=60;xxxx=555", error, sizeof(error), NULL); ok(ret, "SQLConfigDriver failed\n"); sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(sql_ret == SQL_NO_DATA || (sql_ret && error_code == SQL_SUCCESS), "SQLConfigDriver failed %d, %u\n", sql_ret, error_code); + ok(sql_ret == SQL_NO_DATA || (sql_ret && error_code == SQL_SUCCESS), "SQLConfigDriver failed %d, %lu\n", sql_ret, error_code);
if (ret) { @@ -497,19 +497,19 @@ if (0) /* Crashes on XP. */
memset(path, 0, sizeof(path)); res = RegQueryValueExA(hkey, "Driver", NULL, &type, (BYTE *)path, &size); - ok(res == ERROR_SUCCESS, "got %d\n", res); - ok(type == REG_SZ, "got %u\n", type); - ok(size == strlen(driverpath) + 1, "got %u\n", size); + ok(res == ERROR_SUCCESS, "got %ld\n", res); + ok(type == REG_SZ, "got %lu\n", type); + ok(size == strlen(driverpath) + 1, "got %lu\n", size); ok(!strcmp(path, driverpath), "invalid path %s\n", path);
res = RegQueryValueExA(hkey, "CPTimeout", NULL, &type, (BYTE *)&path, &size); - ok(res == ERROR_SUCCESS, "got %d\n", res); - ok(type == REG_SZ, "got %u\n", type); - ok(size == strlen("59") + 1, "got %u\n", size); + ok(res == ERROR_SUCCESS, "got %ld\n", res); + ok(type == REG_SZ, "got %lu\n", type); + ok(size == strlen("59") + 1, "got %lu\n", size); ok(!strcmp(path, "59"), "invalid value %s\n", path);
res = RegQueryValueExA(hkey, "NoWrite", NULL, &type, (BYTE *)&path, &size); - ok(res == ERROR_FILE_NOT_FOUND, "got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
RegCloseKey(hkey); } @@ -520,13 +520,13 @@ if (0) /* Crashes on XP. */ { size = sizeof(path); res = RegQueryValueExA(hkey, "NoWrite", NULL, &type, (BYTE *)&path, &size); - ok(res == ERROR_SUCCESS, "got %d\n", res); - ok(type == REG_SZ, "got %u\n", type); - ok(size == strlen("60;xxxx=555") + 1, "got %u\n", size); + ok(res == ERROR_SUCCESS, "got %ld\n", res); + ok(type == REG_SZ, "got %lu\n", type); + ok(size == strlen("60;xxxx=555") + 1, "got %lu\n", size); ok(!strcmp(path, "60;xxxx=555"), "invalid value %s\n", path);
res = RegQueryValueExA(hkey, "CPTimeout", NULL, &type, (BYTE *)&path, &size); - ok(res == ERROR_FILE_NOT_FOUND, "got %d\n", res); + ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res); RegCloseKey(hkey); } } @@ -534,12 +534,12 @@ if (0) /* Crashes on XP. */ cnt = 100; ret = SQLRemoveDriver("WINE ODBC Driver", FALSE, &cnt); ok(ret, "SQLRemoveDriver failed\n"); - ok(cnt == 0, "SQLRemoveDriver failed %d\n", cnt); + ok(cnt == 0, "SQLRemoveDriver failed %ld\n", cnt);
cnt = 100; ret = SQLRemoveDriver("WINE ODBC Driver Path", FALSE, &cnt); ok(ret, "SQLRemoveDriver failed\n"); - ok(cnt == 0, "SQLRemoveDriver failed %d\n", cnt); + ok(cnt == 0, "SQLRemoveDriver failed %ld\n", cnt); }
static void test_SQLInstallTranslatorEx(void) @@ -562,14 +562,14 @@ static void test_SQLInstallTranslatorEx(void) win_skip("not enough privileges\n"); return; } - ok(sql_ret && error_code == SQL_SUCCESS, "SQLInstallDriverEx failed %d, %u\n", sql_ret, error_code); + ok(sql_ret && error_code == SQL_SUCCESS, "SQLInstallDriverEx failed %d, %lu\n", sql_ret, error_code); ok(!strcmp(path, syspath), "invalid path %s\n", path); ok(size == strlen(path), "invalid length %d\n", size);
ret = SQLInstallTranslatorEx("WINE ODBC Translator Path\0Translator=sample.dll\0Setup=sample.dll\0", "c:\temp", path, MAX_PATH, &size, ODBC_INSTALL_COMPLETE, NULL); sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(sql_ret && error_code == SQL_SUCCESS, "SQLInstallTranslatorEx failed %d, %u\n", sql_ret, error_code); + ok(sql_ret && error_code == SQL_SUCCESS, "SQLInstallTranslatorEx failed %d, %lu\n", sql_ret, error_code); ok(!strcmp(path, "c:\temp"), "invalid path %s\n", path); ok(size == strlen(path), "invalid length %d\n", size);
@@ -589,8 +589,8 @@ static void test_SQLInstallTranslatorEx(void) memset(path, 0, sizeof(path)); res = RegQueryValueExA(hkey, "Translator", NULL, &type, (BYTE *)path, &size); ok(res == ERROR_SUCCESS, "RegGetValueA failed\n"); - ok(type == REG_SZ, "got %u\n", type); - ok(size == strlen(driverpath) + 1, "got %u\n", size); + ok(type == REG_SZ, "got %lu\n", type); + ok(size == strlen(driverpath) + 1, "got %lu\n", size); ok(!strcmp(path, driverpath), "invalid path %s\n", path);
RegCloseKey(hkey); @@ -600,20 +600,20 @@ static void test_SQLInstallTranslatorEx(void) cnt = 100; ret = SQLRemoveTranslator("WINE ODBC Translator", &cnt); ok(ret, "SQLRemoveTranslator failed\n"); - ok(cnt == 0, "SQLRemoveTranslator failed %d\n", cnt); + ok(cnt == 0, "SQLRemoveTranslator failed %ld\n", cnt);
cnt = 100; ret = SQLRemoveTranslator("WINE ODBC Translator Path", &cnt); ok(ret, "SQLRemoveTranslator failed\n"); - ok(cnt == 0, "SQLRemoveTranslator failed %d\n", cnt); + ok(cnt == 0, "SQLRemoveTranslator failed %ld\n", cnt);
cnt = 100; ret = SQLRemoveTranslator("WINE ODBC Translator NonExist", &cnt); ok(!ret, "SQLRemoveTranslator succeeded\n"); - ok(cnt == 100, "SQLRemoveTranslator succeeded %d\n", cnt); + ok(cnt == 100, "SQLRemoveTranslator succeeded %ld\n", cnt); sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); ok(sql_ret && error_code == ODBC_ERROR_COMPONENT_NOT_FOUND, - "SQLInstallTranslatorEx failed %d, %u\n", sql_ret, error_code); + "SQLInstallTranslatorEx failed %d, %lu\n", sql_ret, error_code);
}
@@ -763,7 +763,7 @@ static void test_SQLConfigDataSource(void) DWORD err; ret = SQLInstallerError(1, &err, NULL, 0, NULL); ok(ret == SQL_SUCCESS_WITH_INFO, "got %d\n", ret); - todo_wine ok(err == ODBC_ERROR_INVALID_DSN, "got %u\n", err); + todo_wine ok(err == ODBC_ERROR_INVALID_DSN, "got %lu\n", err); }
ret = SQLConfigDataSource(0, ODBC_ADD_DSN, "ODBC driver", "DSN=ODBC data source\0\0"); @@ -803,7 +803,7 @@ static void test_SQLWriteDSNToIni(void) memset(buffer, 0, sizeof(buffer)); res = RegQueryValueExA(hkey, "wine_dbs", NULL, &type, (BYTE *)buffer, &size); ok(res == ERROR_SUCCESS, "RegGetValueA failed\n"); - ok(type == REG_SZ, "got %u\n", type); + ok(type == REG_SZ, "got %lu\n", type); ok(!strcmp(buffer, "SQL Server"), "incorrect string '%s'\n", buffer);
RegCloseKey(hkey); @@ -820,7 +820,7 @@ static void test_SQLWriteDSNToIni(void) memset(path, 0, sizeof(path)); res = RegQueryValueExA(hkey, "driver", NULL, &type, (BYTE *)path, &size); ok(res == ERROR_SUCCESS, "RegGetValueA failed\n"); - ok(type == REG_SZ, "got %u\n", type); + ok(type == REG_SZ, "got %lu\n", type); /* WINE doesn't have a 'SQL Server' driver available */ todo_wine ok(strlen(path) != 0, "Invalid value\n");
@@ -850,7 +850,7 @@ static void test_SQLWriteDSNToIni(void) memset(buffer, 0, sizeof(buffer)); res = RegQueryValueExA(hkey, "wine_mis", NULL, &type, (BYTE *)buffer, &size); ok(res == ERROR_SUCCESS, "RegGetValueA failed\n"); - ok(type == REG_SZ, "got %u\n", type); + ok(type == REG_SZ, "got %lu\n", type); ok(!strcmp(buffer, "Missing Access Driver (*.mis)"), "incorrect string '%s'\n", buffer);
RegCloseKey(hkey); @@ -867,7 +867,7 @@ static void test_SQLWriteDSNToIni(void) memset(path, 0, sizeof(path)); res = RegQueryValueExA(hkey, "driver", NULL, &type, (BYTE *)path, &size); ok(res == ERROR_SUCCESS, "RegGetValueA failed\n"); - ok(type == REG_SZ, "got %u\n", type); + ok(type == REG_SZ, "got %lu\n", type); ok(strlen(path) == 0, "Invalid value\n");
RegCloseKey(hkey);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ole32/tests/moniker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index afbea762e89..ec4273284e3 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -3183,7 +3183,7 @@ static void test_generic_composite_moniker(void) for (i = 0; i < ARRAY_SIZE(simplify_tests); ++i) { IMoniker *left, *right, *composite = NULL; - unsigned int moniker_type; + DWORD moniker_type; WCHAR *name;
winetest_push_context("simplify[%u]", i);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ole32/tests/Makefile.in | 1 dlls/ole32/tests/clipboard.c | 570 +++++++++--------- dlls/ole32/tests/compobj.c | 882 ++++++++++++++-------------- dlls/ole32/tests/defaulthandler.c | 48 +- dlls/ole32/tests/dragdrop.c | 40 + dlls/ole32/tests/errorinfo.c | 8 dlls/ole32/tests/hglobalstream.c | 144 ++--- dlls/ole32/tests/marshal.c | 248 ++++---- dlls/ole32/tests/moniker.c | 1162 +++++++++++++++++++------------------ dlls/ole32/tests/ole2.c | 826 +++++++++++++------------- dlls/ole32/tests/ole_server.c | 86 +-- dlls/ole32/tests/propvariant.c | 72 +- dlls/ole32/tests/stg_prop.c | 238 ++++---- dlls/ole32/tests/storage32.c | 724 ++++++++++++----------- dlls/ole32/tests/usrmarshal.c | 238 ++++---- 15 files changed, 2643 insertions(+), 2644 deletions(-)
diff --git a/dlls/ole32/tests/Makefile.in b/dlls/ole32/tests/Makefile.in index 2cc40927a5d..17710fb9a9a 100644 --- a/dlls/ole32/tests/Makefile.in +++ b/dlls/ole32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ole32.dll IMPORTS = oleaut32 ole32 user32 uuid gdi32 advapi32
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c index 97575371edc..998454e78c2 100644 --- a/dlls/ole32/tests/clipboard.c +++ b/dlls/ole32/tests/clipboard.c @@ -46,7 +46,7 @@ static inline char *dump_fmtetc(FORMATETC *fmt) { static char buf[100];
- sprintf(buf, "cf %04x ptd %p aspect %x lindex %d tymed %x", + sprintf(buf, "cf %04x ptd %p aspect %lx lindex %ld tymed %lx", fmt->cfFormat, fmt->ptd, fmt->dwAspect, fmt->lindex, fmt->tymed); return buf; } @@ -153,7 +153,7 @@ static HRESULT WINAPI EnumFormatImpl_Next(IEnumFORMATETC *iface, ULONG celt, ULONG count, i;
if (winetest_debug > 1) - trace("next: count %d cur %d\n", celt, This->cur); + trace("next: count %ld cur %d\n", celt, This->cur);
if(!rgelt) return E_INVALIDARG; @@ -274,7 +274,7 @@ static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pfor
DataObjectImpl_GetData_calls++;
- ok(pmedium->tymed == 0, "pmedium->tymed = %u\n", pmedium->tymed); + ok(pmedium->tymed == 0, "pmedium->tymed = %lu\n", pmedium->tymed); ok(U(*pmedium).hGlobal == NULL, "pmedium->hGlobal = %p\n", U(*pmedium).hGlobal); ok(pmedium->pUnkForRelease == NULL, "pmedium->pUnkForRelease = %p\n", pmedium->pUnkForRelease);
@@ -373,7 +373,7 @@ static HRESULT WINAPI DataObjectImpl_EnumFormatEtc(IDataObject* iface, DWORD dwD DataObjectImpl_EnumFormatEtc_calls++;
if(dwDirection != DATADIR_GET) { - ok(0, "unexpected direction %d\n", dwDirection); + ok(0, "unexpected direction %ld\n", dwDirection); return E_NOTIMPL; } return EnumFormatImpl_Create(This->fmtetc, This->fmtetc_cnt, ppenumFormatEtc); @@ -510,18 +510,18 @@ static void test_get_clipboard_uninitialized(void)
pDObj = (IDataObject *)0xdeadbeef; hr = OleGetClipboard(&pDObj); - ok(hr == S_OK, "OleGetClipboard() got 0x%08x instead of 0x%08x\n", hr, S_OK); + ok(hr == S_OK, "OleGetClipboard() got 0x%08lx instead of 0x%08lx\n", hr, S_OK); ok(!!pDObj && pDObj != (IDataObject *)0xdeadbeef, "Got unexpected pDObj %p.\n", pDObj);
/* COM is still not initialized. */ hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "Got unexpected hr %#x.\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "Got unexpected hr %#lx.\n", hr);
hr = OleFlushClipboard(); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = OleIsCurrentClipboard(pDObj); - ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Got unexpected hr %#lx.\n", hr);
IDataObject_Release(pDObj); } @@ -534,10 +534,10 @@ static void test_get_clipboard(void) STGMEDIUM stgmedium;
hr = OleGetClipboard(NULL); - ok(hr == E_INVALIDARG, "OleGetClipboard(NULL) should return E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "OleGetClipboard(NULL) should return E_INVALIDARG instead of 0x%08lx\n", hr);
hr = OleGetClipboard(&data_obj); - ok(hr == S_OK, "OleGetClipboard failed with error 0x%08x\n", hr); + ok(hr == S_OK, "OleGetClipboard failed with error 0x%08lx\n", hr);
/* test IDataObject_QueryGetData */
@@ -546,31 +546,31 @@ static void test_get_clipboard(void)
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08lx\n", hr);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.dwAspect = 0xdeadbeef; hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08lx\n", hr);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.dwAspect = DVASPECT_THUMBNAIL; hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08lx\n", hr);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.lindex = 256; hr = IDataObject_QueryGetData(data_obj, &fmtetc); ok(hr == DV_E_FORMATETC || broken(hr == S_OK), - "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08lx\n", hr);
InitFormatEtc(fmtetc, CF_RIFF, TYMED_HGLOBAL); hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == DV_E_CLIPFORMAT, "IDataObject_QueryGetData should have failed with DV_E_CLIPFORMAT instead of 0x%08x\n", hr); + ok(hr == DV_E_CLIPFORMAT, "IDataObject_QueryGetData should have failed with DV_E_CLIPFORMAT instead of 0x%08lx\n", hr);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_FILE); hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08lx\n", hr);
expect_DataObjectImpl_QueryGetData = TRUE;
@@ -580,25 +580,25 @@ static void test_get_clipboard(void)
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.dwAspect = 0xdeadbeef; hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.dwAspect = DVASPECT_THUMBNAIL; hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.lindex = 256; hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == DV_E_FORMATETC || broken(hr == S_OK), "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + ok(hr == DV_E_FORMATETC || broken(hr == S_OK), "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08lx\n", hr); if (hr == S_OK) { /* undo the unexpected success */ @@ -608,15 +608,15 @@ static void test_get_clipboard(void)
InitFormatEtc(fmtetc, CF_RIFF, TYMED_HGLOBAL); hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_FILE); hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == DV_E_TYMED, "IDataObject_GetData should have failed with DV_E_TYMED instead of 0x%08x\n", hr); + ok(hr == DV_E_TYMED, "IDataObject_GetData should have failed with DV_E_TYMED instead of 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
- ok(DataObjectImpl_GetData_calls == 6, "DataObjectImpl_GetData should have been called 6 times instead of %d times\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetData_calls == 6, "DataObjectImpl_GetData should have been called 6 times instead of %ld times\n", DataObjectImpl_GetData_calls);
IDataObject_Release(data_obj); } @@ -630,16 +630,16 @@ static void test_enum_fmtetc(IDataObject *src) DWORD count = 0;
hr = OleGetClipboard(&data); - ok(hr == S_OK, "OleGetClipboard failed with error 0x%08x\n", hr); + ok(hr == S_OK, "OleGetClipboard failed with error 0x%08lx\n", hr);
hr = IDataObject_EnumFormatEtc(data, DATADIR_SET, &enum_fmt); ok(hr == E_NOTIMPL || broken(hr == E_INVALIDARG), /* win98 (not win98SE) */ - "got %08x\n", hr); + "got %08lx\n", hr);
DataObjectImpl_EnumFormatEtc_calls = 0; hr = IDataObject_EnumFormatEtc(data, DATADIR_GET, &enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(DataObjectImpl_EnumFormatEtc_calls == 0, "EnumFormatEtc was called\n"); if (FAILED(hr)) { @@ -653,32 +653,32 @@ static void test_enum_fmtetc(IDataObject *src) { ok(src != NULL, "shouldn't be here\n"); hr = IEnumFORMATETC_Next(src_enum, 1, &src_fmt, NULL); - ok(hr == S_OK, "%d: got %08x\n", count, hr); - trace("%d: %s\n", count, dump_fmtetc(&fmt)); - ok(fmt.cfFormat == src_fmt.cfFormat, "%d: %04x %04x\n", count, fmt.cfFormat, src_fmt.cfFormat); - ok(fmt.dwAspect == src_fmt.dwAspect, "%d: %08x %08x\n", count, fmt.dwAspect, src_fmt.dwAspect); - ok(fmt.lindex == src_fmt.lindex, "%d: %08x %08x\n", count, fmt.lindex, src_fmt.lindex); - ok(fmt.tymed == src_fmt.tymed, "%d: %08x %08x\n", count, fmt.tymed, src_fmt.tymed); + ok(hr == S_OK, "%ld: got %08lx\n", count, hr); + trace("%ld: %s\n", count, dump_fmtetc(&fmt)); + ok(fmt.cfFormat == src_fmt.cfFormat, "%ld: %04x %04x\n", count, fmt.cfFormat, src_fmt.cfFormat); + ok(fmt.dwAspect == src_fmt.dwAspect, "%ld: %08lx %08lx\n", count, fmt.dwAspect, src_fmt.dwAspect); + ok(fmt.lindex == src_fmt.lindex, "%ld: %08lx %08lx\n", count, fmt.lindex, src_fmt.lindex); + ok(fmt.tymed == src_fmt.tymed, "%ld: %08lx %08lx\n", count, fmt.tymed, src_fmt.tymed); if(fmt.ptd) { - ok(src_fmt.ptd != NULL, "%d: expected non-NULL\n", count); + ok(src_fmt.ptd != NULL, "%ld: expected non-NULL\n", count); CoTaskMemFree(fmt.ptd); CoTaskMemFree(src_fmt.ptd); } count++; }
- ok(hr == S_FALSE, "%d: got %08x\n", count, hr); + ok(hr == S_FALSE, "%ld: got %08lx\n", count, hr);
if(src) { hr = IEnumFORMATETC_Next(src_enum, 1, &src_fmt, NULL); - ok(hr == S_FALSE, "%d: got %08x\n", count, hr); + ok(hr == S_FALSE, "%ld: got %08lx\n", count, hr); IEnumFORMATETC_Release(src_enum); }
hr = IEnumFORMATETC_Reset(enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if(src) /* Exercise the enumerator a bit */ { @@ -686,24 +686,24 @@ static void test_enum_fmtetc(IDataObject *src) FORMATETC third_fmt;
hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IEnumFORMATETC_Reset(enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IEnumFORMATETC_Skip(enum_fmt, 2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IEnumFORMATETC_Clone(enum_fmt, &clone); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == third_fmt.cfFormat, "formats don't match\n"); hr = IEnumFORMATETC_Next(clone, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == third_fmt.cfFormat, "formats don't match\n"); IEnumFORMATETC_Release(clone); } @@ -746,7 +746,7 @@ static void test_cf_dataobject(IDataObject *data) HWND clip_owner = GetClipboardOwner();
found_dataobject = TRUE; - ok(size >= sizeof(*ptr), "size %d\n", size); + ok(size >= sizeof(*ptr), "size %ld\n", size); if(data) ok(*ptr == clip_owner, "hwnd %p clip_owner %p\n", *ptr, clip_owner); else /* ole clipboard flushed */ @@ -788,7 +788,7 @@ static void test_cf_dataobject(IDataObject *data) CLIPFORMAT cfs_seen[10];
hr = IDataObject_EnumFormatEtc(data, DATADIR_GET, &enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); fmt_ptr = priv->fmts;
while(IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL) == S_OK) @@ -798,11 +798,11 @@ static void test_cf_dataobject(IDataObject *data)
ok(fmt_ptr->fmt.cfFormat == fmt.cfFormat, "got %08x expected %08x\n", fmt_ptr->fmt.cfFormat, fmt.cfFormat); - ok(fmt_ptr->fmt.dwAspect == fmt.dwAspect, "got %08x expected %08x\n", + ok(fmt_ptr->fmt.dwAspect == fmt.dwAspect, "got %08lx expected %08lx\n", fmt_ptr->fmt.dwAspect, fmt.dwAspect); - ok(fmt_ptr->fmt.lindex == fmt.lindex, "got %08x expected %08x\n", + ok(fmt_ptr->fmt.lindex == fmt.lindex, "got %08lx expected %08lx\n", fmt_ptr->fmt.lindex, fmt.lindex); - ok(fmt_ptr->fmt.tymed == fmt.tymed, "got %08x expected %08x\n", + ok(fmt_ptr->fmt.tymed == fmt.tymed, "got %08lx expected %08lx\n", fmt_ptr->fmt.tymed, fmt.tymed); for(i = 0; i < count; i++) if(fmt_ptr->fmt.cfFormat == cfs_seen[i]) @@ -813,8 +813,8 @@ static void test_cf_dataobject(IDataObject *data) cfs_seen[count] = fmt.cfFormat; ok(fmt_ptr->first_use_of_cf != seen_cf, "got %08x expected %08x\n", fmt_ptr->first_use_of_cf, !seen_cf); - ok(fmt_ptr->res[0] == 0, "got %08x\n", fmt_ptr->res[0]); - ok(fmt_ptr->res[1] == 0, "got %08x\n", fmt_ptr->res[1]); + ok(fmt_ptr->res[0] == 0, "got %08lx\n", fmt_ptr->res[0]); + ok(fmt_ptr->res[1] == 0, "got %08lx\n", fmt_ptr->res[1]); if(fmt.ptd) { DVTARGETDEVICE *target; @@ -827,16 +827,16 @@ static void test_cf_dataobject(IDataObject *data) fmt_ptr++; count++; } - ok(priv->res1 == 0, "got %08x\n", priv->res1); - ok(priv->res2 == 1, "got %08x\n", priv->res2); - ok(priv->count == count, "got %08x expected %08x\n", priv->count, count); - ok(priv->res3[0] == 0, "got %08x\n", priv->res3[0]); + ok(priv->res1 == 0, "got %08lx\n", priv->res1); + ok(priv->res2 == 1, "got %08lx\n", priv->res2); + ok(priv->count == count, "got %08lx expected %08lx\n", priv->count, count); + ok(priv->res3[0] == 0, "got %08lx\n", priv->res3[0]);
/* win64 sets the lsb */ if(sizeof(fmt_ptr->fmt.ptd) == 8) - todo_wine ok(priv->res3[1] == 1, "got %08x\n", priv->res3[1]); + todo_wine ok(priv->res3[1] == 1, "got %08lx\n", priv->res3[1]); else - ok(priv->res3[1] == 0, "got %08x\n", priv->res3[1]); + ok(priv->res3[1] == 0, "got %08lx\n", priv->res3[1]);
GlobalUnlock(h); IEnumFORMATETC_Release(enum_fmt); @@ -851,11 +851,11 @@ static void test_cf_dataobject(IDataObject *data)
DataObjectImpl_GetDataHere_calls = 0; h = GetClipboardData(cf); - ok(DataObjectImpl_GetDataHere_calls == 1, "got %d\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetDataHere_calls == 1, "got %ld\n", DataObjectImpl_GetDataHere_calls); ptr = GlobalLock(h); size = GlobalSize(h); ok(size == strlen(cmpl_stm_data), - "expected %d got %d\n", lstrlenA(cmpl_stm_data), size); + "expected %d got %ld\n", lstrlenA(cmpl_stm_data), size); ok(!memcmp(ptr, cmpl_stm_data, strlen(cmpl_stm_data)), "mismatch\n"); GlobalUnlock(h); } @@ -867,11 +867,11 @@ static void test_cf_dataobject(IDataObject *data)
DataObjectImpl_GetDataHere_calls = 0; h = GetClipboardData(cf); - ok(DataObjectImpl_GetDataHere_calls == 0, "got %d\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetDataHere_calls == 0, "got %ld\n", DataObjectImpl_GetDataHere_calls); ptr = GlobalLock(h); size = GlobalSize(h); ok(size == strlen(cmpl_text_data) + 1, - "expected %d got %d\n", lstrlenA(cmpl_text_data) + 1, size); + "expected %d got %ld\n", lstrlenA(cmpl_text_data) + 1, size); ok(!memcmp(ptr, cmpl_text_data, strlen(cmpl_text_data) + 1), "mismatch\n"); GlobalUnlock(h); } @@ -889,32 +889,32 @@ static void test_complex_get_clipboard(void) STGMEDIUM stgmedium;
hr = OleGetClipboard(&data_obj); - ok(hr == S_OK, "OleGetClipboard failed with error 0x%08x\n", hr); + ok(hr == S_OK, "OleGetClipboard failed with error 0x%08lx\n", hr);
DataObjectImpl_GetData_calls = 0;
InitFormatEtc(fmtetc, CF_METAFILEPICT, TYMED_MFPICT); hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_METAFILEPICT, TYMED_HGLOBAL); hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == DV_E_TYMED, "IDataObject_GetData failed with error 0x%08x\n", hr); + ok(hr == DV_E_TYMED, "IDataObject_GetData failed with error 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_ENHMETAFILE, TYMED_HGLOBAL); hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == DV_E_TYMED, "IDataObject_GetData failed with error 0x%08x\n", hr); + ok(hr == DV_E_TYMED, "IDataObject_GetData failed with error 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_ENHMETAFILE, TYMED_ENHMF); hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
ok(DataObjectImpl_GetData_calls == 5, - "DataObjectImpl_GetData called 5 times instead of %d times\n", + "DataObjectImpl_GetData called 5 times instead of %ld times\n", DataObjectImpl_GetData_calls); IDataObject_Release(data_obj); } @@ -934,51 +934,51 @@ static void test_set_clipboard(void) cf_onemore = RegisterClipboardFormatA("one more format");
hr = DataObjectImpl_CreateText("data1", &data1); - ok(hr == S_OK, "Failed to create data1 object: 0x%08x\n", hr); + ok(hr == S_OK, "Failed to create data1 object: 0x%08lx\n", hr); if(FAILED(hr)) return; hr = DataObjectImpl_CreateText("data2", &data2); - ok(hr == S_OK, "Failed to create data2 object: 0x%08x\n", hr); + ok(hr == S_OK, "Failed to create data2 object: 0x%08lx\n", hr); if(FAILED(hr)) return; hr = DataObjectImpl_CreateComplex(&data_cmpl); - ok(hr == S_OK, "Failed to create complex data object: 0x%08x\n", hr); + ok(hr == S_OK, "Failed to create complex data object: 0x%08lx\n", hr); if(FAILED(hr)) return;
hr = OleSetClipboard(data1); - ok(hr == CO_E_NOTINITIALIZED, "OleSetClipboard should have failed with CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "OleSetClipboard should have failed with CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
CoInitialize(NULL); hr = OleSetClipboard(data1); - ok(hr == CO_E_NOTINITIALIZED, "OleSetClipboard failed with 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "OleSetClipboard failed with 0x%08lx\n", hr); CoUninitialize();
hr = OleInitialize(NULL); - ok(hr == S_OK, "OleInitialize failed with error 0x%08x\n", hr); + ok(hr == S_OK, "OleInitialize failed with error 0x%08lx\n", hr);
hr = OleSetClipboard(data1); - ok(hr == S_OK, "failed to set clipboard to data1, hr = 0x%08x\n", hr); + ok(hr == S_OK, "failed to set clipboard to data1, hr = 0x%08lx\n", hr);
test_cf_dataobject(data1);
hr = OleIsCurrentClipboard(data1); - ok(hr == S_OK, "expected current clipboard to be data1, hr = 0x%08x\n", hr); + ok(hr == S_OK, "expected current clipboard to be data1, hr = 0x%08lx\n", hr); hr = OleIsCurrentClipboard(data2); - ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08x\n", hr); + ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08lx\n", hr); hr = OleIsCurrentClipboard(NULL); - ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08x\n", hr); + ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08lx\n", hr);
test_get_clipboard();
hr = OleSetClipboard(data2); - ok(hr == S_OK, "failed to set clipboard to data2, hr = 0x%08x\n", hr); + ok(hr == S_OK, "failed to set clipboard to data2, hr = 0x%08lx\n", hr); hr = OleIsCurrentClipboard(data1); - ok(hr == S_FALSE, "did not expect current clipboard to be data1, hr = 0x%08x\n", hr); + ok(hr == S_FALSE, "did not expect current clipboard to be data1, hr = 0x%08lx\n", hr); hr = OleIsCurrentClipboard(data2); - ok(hr == S_OK, "expected current clipboard to be data2, hr = 0x%08x\n", hr); + ok(hr == S_OK, "expected current clipboard to be data2, hr = 0x%08lx\n", hr); hr = OleIsCurrentClipboard(NULL); - ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08x\n", hr); + ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08lx\n", hr);
/* put a format directly onto the clipboard to show OleFlushClipboard doesn't empty the clipboard */ @@ -997,13 +997,13 @@ static void test_set_clipboard(void) ok( CloseClipboard(), "CloseClipboard failed\n" );
hr = OleFlushClipboard(); - ok(hr == S_OK, "failed to flush clipboard, hr = 0x%08x\n", hr); + ok(hr == S_OK, "failed to flush clipboard, hr = 0x%08lx\n", hr); hr = OleIsCurrentClipboard(data1); - ok(hr == S_FALSE, "did not expect current clipboard to be data1, hr = 0x%08x\n", hr); + ok(hr == S_FALSE, "did not expect current clipboard to be data1, hr = 0x%08lx\n", hr); hr = OleIsCurrentClipboard(data2); - ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08x\n", hr); + ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08lx\n", hr); hr = OleIsCurrentClipboard(NULL); - ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08x\n", hr); + ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08lx\n", hr);
/* format should survive the flush */ ok( OpenClipboard(NULL), "OpenClipboard failed\n" ); @@ -1017,7 +1017,7 @@ static void test_set_clipboard(void) test_cf_dataobject(NULL);
hr = OleSetClipboard(NULL); - ok(hr == S_OK, "Failed to clear clipboard, hr = 0x%08x\n", hr); + ok(hr == S_OK, "Failed to clear clipboard, hr = 0x%08lx\n", hr);
OpenClipboard(NULL); h = GetClipboardData(cf_onemore); @@ -1026,23 +1026,23 @@ static void test_set_clipboard(void)
trace("setting complex\n"); hr = OleSetClipboard(data_cmpl); - ok(hr == S_OK, "failed to set clipboard to complex data, hr = 0x%08x\n", hr); + ok(hr == S_OK, "failed to set clipboard to complex data, hr = 0x%08lx\n", hr); test_complex_get_clipboard(); test_cf_dataobject(data_cmpl); test_enum_fmtetc(data_cmpl);
hr = OleSetClipboard(NULL); - ok(hr == S_OK, "failed to clear clipboard, hr = 0x%08x.\n", hr); + ok(hr == S_OK, "failed to clear clipboard, hr = 0x%08lx.\n", hr);
test_no_cf_dataobject(); test_enum_fmtetc(NULL);
ref = IDataObject_Release(data1); - ok(ref == 0, "expected data1 ref=0, got %d\n", ref); + ok(ref == 0, "expected data1 ref=0, got %ld\n", ref); ref = IDataObject_Release(data2); - ok(ref == 0, "expected data2 ref=0, got %d\n", ref); + ok(ref == 0, "expected data2 ref=0, got %ld\n", ref); ref = IDataObject_Release(data_cmpl); - ok(ref == 0, "expected data_cmpl ref=0, got %d\n", ref); + ok(ref == 0, "expected data_cmpl ref=0, got %ld\n", ref);
OleUninitialize(); } @@ -1065,7 +1065,7 @@ static LRESULT CALLBACK clipboard_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARA /* this demonstrates an issue in Qt where it will free the data while it's being set */ HRESULT hr = OleIsCurrentClipboard( clip_data ); ok( hr == (wm_drawclipboard > 1) ? S_OK : S_FALSE, - "OleIsCurrentClipboard returned %x\n", hr ); + "OleIsCurrentClipboard returned %lx\n", hr ); } break; case WM_CHANGECBCHAIN: @@ -1101,7 +1101,7 @@ static void test_set_clipboard_DRAWCLIPBOARD(void) HANDLE thread;
hr = DataObjectImpl_CreateText("data", &data); - ok(hr == S_OK, "Failed to create data object: 0x%08x\n", hr); + ok(hr == S_OK, "Failed to create data object: 0x%08lx\n", hr);
memset(&cls, 0, sizeof(cls)); cls.lpfnWndProc = clipboard_wnd_proc; @@ -1110,33 +1110,33 @@ static void test_set_clipboard_DRAWCLIPBOARD(void) RegisterClassA(&cls);
viewer = CreateWindowA("clipboard_test", NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0); - ok(viewer != NULL, "CreateWindow failed: %d\n", GetLastError()); + ok(viewer != NULL, "CreateWindow failed: %ld\n", GetLastError()); next_wnd = SetClipboardViewer( viewer );
ret = SendMessageA( viewer, WM_USER, 0, 0 ); ok( ret == 1, "%u WM_DRAWCLIPBOARD received\n", ret );
hr = OleInitialize(NULL); - ok(hr == S_OK, "OleInitialize failed with error 0x%08x\n", hr); + ok(hr == S_OK, "OleInitialize failed with error 0x%08lx\n", hr);
ret = SendMessageA( viewer, WM_USER, 0, 0 ); ok( !ret, "%u WM_DRAWCLIPBOARD received\n", ret );
thread = CreateThread(NULL, 0, set_clipboard_thread, NULL, 0, NULL); - ok(thread != NULL, "CreateThread failed (%d)\n", GetLastError()); + ok(thread != NULL, "CreateThread failed (%ld)\n", GetLastError()); ret = WaitForSingleObject(thread, 5000); ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", ret);
clip_data = data; hr = OleSetClipboard(data); - ok(hr == S_OK, "failed to set clipboard to data, hr = 0x%08x\n", hr); + ok(hr == S_OK, "failed to set clipboard to data, hr = 0x%08lx\n", hr);
ret = SendMessageA( viewer, WM_USER, 0, 0 ); ok( ret == 2, "%u WM_DRAWCLIPBOARD received\n", ret );
clip_data = NULL; hr = OleFlushClipboard(); - ok(hr == S_OK, "failed to flush clipboard, hr = 0x%08x\n", hr); + ok(hr == S_OK, "failed to flush clipboard, hr = 0x%08lx\n", hr); ret = IDataObject_Release(data); ok(ret == 0, "got %d\n", ret);
@@ -1167,41 +1167,41 @@ static void test_consumer_refs(void) a different data object */
hr = DataObjectImpl_CreateText("data1", &src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = DataObjectImpl_CreateText("data2", &src2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleGetClipboard(&get1); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleGetClipboard(&get2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(get1 == get2, "data objects differ\n"); refs = IDataObject_Release(get2); - ok(refs == (get1 == get2 ? 1 : 0), "got %d\n", refs); + ok(refs == (get1 == get2 ? 1 : 0), "got %ld\n", refs);
OleFlushClipboard();
DataObjectImpl_GetData_calls = 0; hr = IDataObject_GetData(get1, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(DataObjectImpl_GetData_calls == 0, "GetData called\n"); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
hr = OleGetClipboard(&get2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(get1 != get2, "data objects match\n");
hr = OleSetClipboard(NULL); - ok(hr == S_OK, "Failed to clear clipboard, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear clipboard, hr %#lx.\n", hr);
hr = OleGetClipboard(&get3); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(get1 != get3, "data objects match\n"); ok(get2 != get3, "data objects match\n"); @@ -1214,75 +1214,75 @@ static void test_consumer_refs(void) takes a ref on our src data obj. */
hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
old_refs = count_refs(src);
hr = OleGetClipboard(&get1); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
refs = count_refs(src); - ok(refs == old_refs, "%d %d\n", refs, old_refs); + ok(refs == old_refs, "%ld %ld\n", refs, old_refs);
DataObjectImpl_GetData_calls = 0; hr = IDataObject_GetData(get1, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(DataObjectImpl_GetData_calls == 1, "GetData not called\n"); if(SUCCEEDED(hr)) ReleaseStgMedium(&med); refs = count_refs(src); - ok(refs == old_refs + 1, "%d %d\n", refs, old_refs); + ok(refs == old_refs + 1, "%ld %ld\n", refs, old_refs);
OleFlushClipboard();
DataObjectImpl_GetData_calls = 0; hr = IDataObject_GetData(get1, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(DataObjectImpl_GetData_calls == 1, "GetData not called\n"); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
refs = count_refs(src); - ok(refs == 2, "%d\n", refs); + ok(refs == 2, "%ld\n", refs);
IDataObject_Release(get1);
refs = count_refs(src); - ok(refs == 1, "%d\n", refs); + ok(refs == 1, "%ld\n", refs);
/* Now set a second src object before the call to GetData and show that GetData calls that second src. */
hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
old_refs = count_refs(src);
hr = OleGetClipboard(&get1); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
refs = count_refs(src); - ok(refs == old_refs, "%d %d\n", refs, old_refs); + ok(refs == old_refs, "%ld %ld\n", refs, old_refs);
hr = OleSetClipboard(src2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
old_refs = count_refs(src2);
DataObjectImpl_GetData_calls = 0; hr = IDataObject_GetData(get1, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(DataObjectImpl_GetData_calls == 1, "GetData not called\n"); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
refs = count_refs(src); - ok(refs == 1, "%d\n", refs); + ok(refs == 1, "%ld\n", refs); refs = count_refs(src2); - ok(refs == old_refs + 1, "%d %d\n", refs, old_refs); + ok(refs == old_refs + 1, "%ld %ld\n", refs, old_refs);
hr = OleSetClipboard(NULL); - ok(hr == S_OK, "Failed to clear clipboard, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear clipboard, hr %#lx.\n", hr);
refs = count_refs(src2); - ok(refs == 2, "%d\n", refs); + ok(refs == 2, "%ld\n", refs);
IDataObject_Release(get1);
@@ -1291,25 +1291,25 @@ static void test_consumer_refs(void) /* Show that OleUninitialize() doesn't release the dataobject's ref, and thus the object is leaked. */ old_refs = count_refs(src); - ok(old_refs == 1, "%d\n", old_refs); + ok(old_refs == 1, "%ld\n", old_refs);
hr = OleSetClipboard(src); - ok(hr == S_OK, "Failed to clear clipboard, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear clipboard, hr %#lx.\n", hr); refs = count_refs(src); - ok(refs > old_refs, "%d %d\n", refs, old_refs); + ok(refs > old_refs, "%ld %ld\n", refs, old_refs);
OleUninitialize(); refs = count_refs(src); - ok(refs == 2, "%d\n", refs); + ok(refs == 2, "%ld\n", refs);
OleInitialize(NULL); hr = OleSetClipboard(NULL); - ok(hr == S_OK, "Failed to clear clipboard, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear clipboard, hr %#lx.\n", hr);
OleUninitialize();
refs = count_refs(src); - ok(refs == 2, "%d\n", refs); + ok(refs == 2, "%ld\n", refs);
IDataObject_Release(src); } @@ -1322,12 +1322,12 @@ static HGLOBAL create_storage(void) HRESULT hr;
hr = CreateILockBytesOnHGlobal(NULL, FALSE, &ilb); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = StgCreateDocfileOnILockBytes(ilb, STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stg); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); IStorage_Release(stg); hr = GetHGlobalFromILockBytes(ilb, &hg); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ILockBytes_Release(ilb); return hg; } @@ -1344,109 +1344,109 @@ static void test_flushed_getdata(void) OleInitialize(NULL);
hr = DataObjectImpl_CreateComplex(&src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleFlushClipboard(); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* global format -> global & stream */
InitFormatEtc(fmt, CF_TEXT, TYMED_HGLOBAL); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, CF_TEXT, TYMED_ISTREAM); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTREAM, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, CF_TEXT, TYMED_ISTORAGE); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); + ok(hr == E_FAIL, "got %08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, CF_TEXT, 0xffff); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
/* stream format -> global & stream */
InitFormatEtc(fmt, cf_stream, TYMED_ISTREAM); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTREAM, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, cf_stream, TYMED_ISTORAGE); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); + ok(hr == E_FAIL, "got %08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, cf_stream, TYMED_HGLOBAL); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, cf_stream, 0xffff); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTREAM, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
/* storage format -> global, stream & storage */
InitFormatEtc(fmt, cf_storage, TYMED_ISTORAGE); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) { hr = IStorage_Stat(med.u.pstg, &stat, STATFLAG_NONAME); - ok(hr == S_OK, "got %08x\n", hr); - ok(stat.grfMode == (STGM_SHARE_EXCLUSIVE | STGM_READWRITE), "got %08x\n", stat.grfMode); + ok(hr == S_OK, "got %08lx\n", hr); + ok(stat.grfMode == (STGM_SHARE_EXCLUSIVE | STGM_READWRITE), "got %08lx\n", stat.grfMode); ReleaseStgMedium(&med); }
InitFormatEtc(fmt, cf_storage, TYMED_ISTREAM); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTREAM, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, cf_storage, TYMED_HGLOBAL); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, cf_storage, TYMED_HGLOBAL | TYMED_ISTREAM); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, cf_storage, 0xffff); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
/* complex format with target device */
InitFormatEtc(fmt, cf_another, 0xffff); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
if (0) /* Causes crashes on both Wine and Windows */ @@ -1466,8 +1466,8 @@ static void test_flushed_getdata(void) memcpy(fmt.ptd->tdData + sizeof(device_name), &dm, dm.dmSize + dm.dmDriverExtra);
hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
HeapFree(GetProcessHeap(), 0, fmt.ptd); @@ -1476,43 +1476,43 @@ static void test_flushed_getdata(void) /* CF_ENHMETAFILE format */ InitFormatEtc(fmt, CF_ENHMETAFILE, TYMED_ENHMF); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
IDataObject_Release(get); IDataObject_Release(src);
hr = DataObjectImpl_CreateFromHGlobal(create_storage(), &src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); InitFormatEtc(fmt, CF_TEXT, TYMED_ISTORAGE); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med); IDataObject_Release(get);
hr = OleFlushClipboard(); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
InitFormatEtc(fmt, CF_TEXT, TYMED_ISTORAGE); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, CF_TEXT, 0xffff); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
IDataObject_Release(get); @@ -1570,22 +1570,22 @@ static void test_nonole_clipboard(void) HDROP hdrop;
r = OpenClipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
OleInitialize(NULL);
/* empty clipboard */ hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IDataObject_EnumFormatEtc(get, DATADIR_GET, &enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_FALSE, "got %08x\n", hr); + ok(hr == S_FALSE, "got %08lx\n", hr); IEnumFORMATETC_Release(enum_fmt);
IDataObject_Release(get); @@ -1599,7 +1599,7 @@ static void test_nonole_clipboard(void) hdrop = create_dropped_file();
r = OpenClipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); h = SetClipboardData(CF_TEXT, htext); ok(h == htext, "got %p\n", h); h = SetClipboardData(cf_onemore, hblob); @@ -1611,12 +1611,12 @@ static void test_nonole_clipboard(void) h = SetClipboardData(CF_HDROP, hdrop); ok(h == hdrop, "got %p\n", h); r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IDataObject_EnumFormatEtc(get, DATADIR_GET, &enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if (FAILED(hr)) { skip("EnumFormatEtc failed, skipping tests.\n"); @@ -1624,104 +1624,104 @@ static void test_nonole_clipboard(void) }
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == CF_TEXT, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == cf_onemore, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == CF_ENHMETAFILE, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == TYMED_ENHMF, "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + ok(fmt.tymed == TYMED_ENHMF, "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == cf_storage, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == CF_HDROP, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); /* User32 adds some synthesised formats */ + ok(hr == S_OK, "got %08lx\n", hr); /* User32 adds some synthesised formats */
ok(fmt.cfFormat == CF_LOCALE, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - todo_wine ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + todo_wine ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(fmt.cfFormat == CF_OEMTEXT, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == CF_UNICODETEXT, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(fmt.cfFormat == CF_METAFILEPICT, "cf %04x\n", fmt.cfFormat); ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == TYMED_MFPICT, "tymed %x\n", fmt.tymed); + ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %lx\n", fmt.dwAspect); + ok(fmt.lindex == -1, "lindex %ld\n", fmt.lindex); + ok(fmt.tymed == TYMED_MFPICT, "tymed %lx\n", fmt.tymed);
hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_FALSE, "got %08x\n", hr); + ok(hr == S_FALSE, "got %08lx\n", hr); IEnumFORMATETC_Release(enum_fmt);
InitFormatEtc(fmt, CF_ENHMETAFILE, TYMED_ENHMF); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); obj_type = GetObjectType(U(med).hEnhMetaFile); - ok(obj_type == OBJ_ENHMETAFILE, "got %d\n", obj_type); + ok(obj_type == OBJ_ENHMETAFILE, "got %ld\n", obj_type); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
InitFormatEtc(fmt, cf_storage, TYMED_ISTORAGE); hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); if(SUCCEEDED(hr)) ReleaseStgMedium(&med);
IDataObject_Release(get);
r = OpenClipboard(NULL); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError()); r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); + ok(r, "gle %ld\n", GetLastError());
OleUninitialize(); } @@ -1736,13 +1736,13 @@ static void test_getdatahere(void) OleInitialize(NULL);
hr = DataObjectImpl_CreateComplex(&src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* global format -> global & stream */
@@ -1755,11 +1755,11 @@ static void test_getdatahere(void) med.tymed = TYMED_HGLOBAL; U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 100); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 1, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 1, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 1, "called %ld\n", DataObjectImpl_GetData_calls);
InitFormatEtc(fmt, CF_TEXT, 0);
@@ -1767,41 +1767,41 @@ static void test_getdatahere(void) med.tymed = TYMED_HGLOBAL; U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 100); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 2, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 2, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 1, "called %ld\n", DataObjectImpl_GetData_calls);
med.pUnkForRelease = NULL; med.tymed = TYMED_HGLOBAL; U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 1); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == E_FAIL, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 3, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 3, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 1, "called %ld\n", DataObjectImpl_GetData_calls);
med.pUnkForRelease = NULL; med.tymed = TYMED_ISTREAM; CreateStreamOnHGlobal(NULL, TRUE, &U(med).pstm); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTREAM, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 4, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 4, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 1, "called %ld\n", DataObjectImpl_GetData_calls);
med.pUnkForRelease = NULL; med.tymed = TYMED_ISTORAGE; StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &U(med).pstg); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == E_FAIL, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 5, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 5, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 1, "called %ld\n", DataObjectImpl_GetData_calls);
InitFormatEtc(fmt, cf_stream, 0);
@@ -1809,31 +1809,31 @@ static void test_getdatahere(void) med.tymed = TYMED_HGLOBAL; U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 100); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 7, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 2, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 7, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 2, "called %ld\n", DataObjectImpl_GetData_calls);
med.pUnkForRelease = NULL; med.tymed = TYMED_ISTREAM; CreateStreamOnHGlobal(NULL, TRUE, &U(med).pstm); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTREAM, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 8, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 2, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 8, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 2, "called %ld\n", DataObjectImpl_GetData_calls);
med.pUnkForRelease = NULL; med.tymed = TYMED_ISTORAGE; StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &U(med).pstg); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == E_FAIL, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 9, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 2, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 9, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 2, "called %ld\n", DataObjectImpl_GetData_calls);
InitFormatEtc(fmt, cf_storage, 0);
@@ -1841,31 +1841,31 @@ static void test_getdatahere(void) med.tymed = TYMED_HGLOBAL; U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 3000); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 11, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 3, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 11, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 3, "called %ld\n", DataObjectImpl_GetData_calls);
med.pUnkForRelease = NULL; med.tymed = TYMED_ISTREAM; CreateStreamOnHGlobal(NULL, TRUE, &U(med).pstm); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTREAM, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 12, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 3, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 12, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 3, "called %ld\n", DataObjectImpl_GetData_calls);
med.pUnkForRelease = NULL; med.tymed = TYMED_ISTORAGE; StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &U(med).pstg); hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); + ok(hr == S_OK, "got %08lx\n", hr); + ok(med.tymed == TYMED_ISTORAGE, "got %lx\n", med.tymed); ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 13, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 3, "called %d\n", DataObjectImpl_GetData_calls); + ok(DataObjectImpl_GetDataHere_calls == 13, "called %ld\n", DataObjectImpl_GetDataHere_calls); + ok(DataObjectImpl_GetData_calls == 3, "called %ld\n", DataObjectImpl_GetData_calls);
IDataObject_Release(get); @@ -1893,15 +1893,15 @@ static void test_multithreaded_clipboard(void) OleInitialize(NULL);
hr = OleGetClipboard(&data_obj); - ok(hr == S_OK, "OleGetClipboard returned %x\n", hr); + ok(hr == S_OK, "OleGetClipboard returned %lx\n", hr);
thread = CreateThread(NULL, 0, test_data_obj, data_obj, 0, NULL); - ok(thread != NULL, "CreateThread failed (%d)\n", GetLastError()); + ok(thread != NULL, "CreateThread failed (%ld)\n", GetLastError()); ret = WaitForSingleObject(thread, 5000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %lx\n", ret);
hr = OleGetClipboard(&data_obj); - ok(hr == S_OK, "OleGetClipboard returned %x\n", hr); + ok(hr == S_OK, "OleGetClipboard returned %lx\n", hr); IDataObject_Release(data_obj);
OleUninitialize(); @@ -1918,7 +1918,7 @@ static void test_get_clipboard_locked(void) /* lock clipboard */ OpenClipboard(NULL); hr = OleGetClipboard(&pDObj); - todo_wine ok(hr == CLIPBRD_E_CANT_OPEN, "OleGetClipboard() got 0x%08x instead of 0x%08x\n", hr, CLIPBRD_E_CANT_OPEN); + todo_wine ok(hr == CLIPBRD_E_CANT_OPEN, "OleGetClipboard() got 0x%08lx instead of 0x%08lx\n", hr, CLIPBRD_E_CANT_OPEN); todo_wine ok(pDObj == NULL, "OleGetClipboard() got 0x%p instead of NULL\n",pDObj); if (pDObj) IDataObject_Release(pDObj); CloseClipboard(); diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 1dcc3bff811..8467e86a66f 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -84,9 +84,9 @@ static HRESULT (WINAPI * pCoCreateInstanceFromApp)(REFCLSID clsid, IUnknown *out
static BOOL (WINAPI *pIsWow64Process)(HANDLE, LPBOOL);
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) -#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks) -#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr) +#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %ld\n", cLocks) +#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %ld\n", cLocks)
static const CLSID CLSID_non_existent = { 0x12345678, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } }; static const CLSID CLSID_StdFont = { 0x0be35203, 0x8f91, 0x11ce, { 0x9d, 0xe3, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51 } }; @@ -205,7 +205,7 @@ static BOOL create_manifest_file(const char *filename, const char *manifest) manifest_len = strlen(manifest); 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); @@ -222,7 +222,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, "Failed to create a file at %s, error %d.\n", path, GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Failed to create a file at %s, error %ld.\n", path, GetLastError());
res = FindResourceA(NULL, name, type); ok(res != 0, "Failed to find resource.\n"); @@ -250,15 +250,15 @@ static HANDLE activate_context(const char *manifest, ULONG_PTR *cookie)
handle = CreateActCtxW(&actctx); ok(handle != INVALID_HANDLE_VALUE || broken(handle == INVALID_HANDLE_VALUE) /* some old XP/2k3 versions */, - "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError()); + "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError()); if (handle == INVALID_HANDLE_VALUE) { - win_skip("activation context generation failed, some tests will be skipped. Error %d\n", GetLastError()); + win_skip("activation context generation failed, some tests will be skipped. Error %ld\n", GetLastError()); handle = NULL; }
- ok(actctx.cbSize == sizeof(ACTCTXW), "actctx.cbSize=%d\n", actctx.cbSize); - ok(actctx.dwFlags == 0, "actctx.dwFlags=%d\n", actctx.dwFlags); + ok(actctx.cbSize == sizeof(ACTCTXW), "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); ok(actctx.wLangId == 0, "actctx.wLangId=%d\n", actctx.wLangId); @@ -272,7 +272,7 @@ static HANDLE activate_context(const char *manifest, ULONG_PTR *cookie) if (handle) { ret = ActivateActCtx(handle, cookie); - ok(ret, "ActivateActCtx failed: %u\n", GetLastError()); + ok(ret, "ActivateActCtx failed: %lu\n", GetLastError()); }
return handle; @@ -283,7 +283,7 @@ static void deactivate_context(HANDLE handle, ULONG_PTR cookie) BOOL ret;
ret = DeactivateActCtx(0, cookie); - ok(ret, "Failed to deactivate context, error %d.\n", GetLastError()); + ok(ret, "Failed to deactivate context, error %ld.\n", GetLastError()); ReleaseActCtx(handle); }
@@ -384,7 +384,7 @@ static void test_ProgIDFromCLSID(void) HRESULT hr;
hr = ProgIDFromCLSID(&CLSID_StdFont, &progid); - ok(hr == S_OK, "ProgIDFromCLSID failed with error 0x%08x\n", hr); + ok(hr == S_OK, "ProgIDFromCLSID failed with error 0x%08lx\n", hr); if (hr == S_OK) { ok(!lstrcmpiW(progid, stdfont), "Didn't get expected prog ID\n"); @@ -393,36 +393,36 @@ static void test_ProgIDFromCLSID(void)
progid = (LPWSTR)0xdeadbeef; hr = ProgIDFromCLSID(&CLSID_non_existent, &progid); - ok(hr == REGDB_E_CLASSNOTREG, "ProgIDFromCLSID returned %08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "ProgIDFromCLSID returned %08lx\n", hr); ok(progid == NULL, "ProgIDFromCLSID returns with progid %p\n", progid);
hr = ProgIDFromCLSID(&CLSID_StdFont, NULL); - ok(hr == E_INVALIDARG, "ProgIDFromCLSID should return E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ProgIDFromCLSID should return E_INVALIDARG instead of 0x%08lx\n", hr);
if ((handle = activate_context(actctx_manifest, &cookie))) { static const WCHAR customfontW[] = {'C','u','s','t','o','m','F','o','n','t',0};
hr = ProgIDFromCLSID(&CLSID_non_existent, &progid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpiW(progid, progidW), "got %s\n", wine_dbgstr_w(progid)); CoTaskMemFree(progid);
/* try something registered and redirected */ progid = NULL; hr = ProgIDFromCLSID(&CLSID_StdFont, &progid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpiW(progid, customfontW), "got wrong progid %s\n", wine_dbgstr_w(progid)); CoTaskMemFree(progid);
/* classes without default progid, progid list is not used */ progid = (void *)0xdeadbeef; hr = ProgIDFromCLSID(&IID_Testiface5, &progid); - ok(hr == REGDB_E_CLASSNOTREG && progid == NULL, "got 0x%08x, progid %p\n", hr, progid); + ok(hr == REGDB_E_CLASSNOTREG && progid == NULL, "got 0x%08lx, progid %p\n", hr, progid);
progid = (void *)0xdeadbeef; hr = ProgIDFromCLSID(&IID_Testiface6, &progid); - ok(hr == REGDB_E_CLASSNOTREG && progid == NULL, "got 0x%08x, progid %p\n", hr, progid); + ok(hr == REGDB_E_CLASSNOTREG && progid == NULL, "got 0x%08lx, progid %p\n", hr, progid);
deactivate_context(handle, cookie); } @@ -434,7 +434,7 @@ static void test_CLSIDFromProgID(void) HANDLE handle; CLSID clsid; HRESULT hr = CLSIDFromProgID(stdfont, &clsid); - ok(hr == S_OK, "CLSIDFromProgID failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CLSIDFromProgID failed with error 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n");
hr = CLSIDFromString(stdfont, &clsid); @@ -444,20 +444,20 @@ static void test_CLSIDFromProgID(void) /* test some failure cases */
hr = CLSIDFromProgID(wszNonExistent, NULL); - ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = CLSIDFromProgID(NULL, &clsid); - ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
memset(&clsid, 0xcc, sizeof(clsid)); hr = CLSIDFromProgID(wszNonExistent, &clsid); - ok(hr == CO_E_CLASSSTRING, "CLSIDFromProgID on nonexistent ProgID should have returned CO_E_CLASSSTRING instead of 0x%08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "CLSIDFromProgID on nonexistent ProgID should have returned CO_E_CLASSSTRING instead of 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_NULL), "CLSIDFromProgID should have set clsid to all-zeros on failure\n");
/* fails without proper context */ memset(&clsid, 0xcc, sizeof(clsid)); hr = CLSIDFromProgID(progidW, &clsid); - ok(hr == CO_E_CLASSSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "got 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_NULL), "wrong clsid\n");
if ((handle = activate_context(actctx_manifest, &cookie))) @@ -466,16 +466,16 @@ static void test_CLSIDFromProgID(void)
memset(&clsid, 0xcc, sizeof(clsid)); hr = CLSIDFromProgID(wszNonExistent, &clsid); - ok(hr == CO_E_CLASSSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "got 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_NULL), "should have zero CLSID on failure\n");
/* CLSIDFromString() doesn't check activation context */ hr = CLSIDFromString(progidW, &clsid); - ok(hr == CO_E_CLASSSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "got 0x%08lx\n", hr);
clsid = CLSID_NULL; hr = CLSIDFromProgID(progidW, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); /* it returns generated CLSID here */ ok(!IsEqualCLSID(&clsid, &CLSID_non_existent) && !IsEqualCLSID(&clsid, &CLSID_NULL), "got wrong clsid %s\n", wine_dbgstr_guid(&clsid)); @@ -483,7 +483,7 @@ static void test_CLSIDFromProgID(void) /* duplicate progid present in context - returns generated guid here too */ clsid = CLSID_NULL; hr = CLSIDFromProgID(stdfont, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); clsid1 = CLSID_StdFont; /* that's where it differs from StdFont */ clsid1.Data4[7] = 0x52; @@ -506,13 +506,13 @@ static void test_CLSIDFromString(void)
memset(&clsid, 0xab, sizeof(clsid)); hr = CLSIDFromString(NULL, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_NULL), "clsid wasn't equal to CLSID_NULL\n");
/* string is longer, but starts with a valid CLSID */ memset(&clsid, 0, sizeof(clsid)); hr = CLSIDFromString(cf_brokenW, &clsid); - ok(hr == CO_E_CLASSSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "got 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &IID_IClassFactory), "got %s\n", wine_dbgstr_guid(&clsid));
lstrcpyW(wszCLSID_Broken, wszCLSID_StdFont); @@ -522,50 +522,50 @@ static void test_CLSIDFromString(void)
memset(&clsid, 0, sizeof(CLSID)); hr = CLSIDFromString(wszCLSID_Broken, &clsid); - ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "Got %08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n");
wszCLSID_Broken[lstrlenW(wszCLSID_StdFont)-1] = 'A'; memset(&clsid, 0, sizeof(CLSID)); hr = CLSIDFromString(wszCLSID_Broken, &clsid); - ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "Got %08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n");
wszCLSID_Broken[lstrlenW(wszCLSID_StdFont)] = '\0'; memset(&clsid, 0, sizeof(CLSID)); hr = CLSIDFromString(wszCLSID_Broken, &clsid); - ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "Got %08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n");
wszCLSID_Broken[lstrlenW(wszCLSID_StdFont)-1] = '\0'; memset(&clsid, 0, sizeof(CLSID)); hr = CLSIDFromString(wszCLSID_Broken, &clsid); - ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "Got %08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n");
memset(&clsid, 0xcc, sizeof(CLSID)); hr = CLSIDFromString(wszCLSID_Broken+1, &clsid); - ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "Got %08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_NULL), "clsid wasn't equal to CLSID_NULL\n");
wszCLSID_Broken[9] = '*'; memset(&clsid, 0xcc, sizeof(CLSID)); hr = CLSIDFromString(wszCLSID_Broken, &clsid); - ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "Got %08lx\n", hr); ok(clsid.Data1 == CLSID_StdFont.Data1, "Got %s\n", debugstr_guid(&clsid)); ok(clsid.Data2 == 0xcccc, "Got %04x\n", clsid.Data2);
wszCLSID_Broken[3] = '*'; memset(&clsid, 0xcc, sizeof(CLSID)); hr = CLSIDFromString(wszCLSID_Broken, &clsid); - ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "Got %08lx\n", hr); ok(clsid.Data1 == 0xb, "Got %s\n", debugstr_guid(&clsid)); ok(clsid.Data2 == 0xcccc, "Got %04x\n", clsid.Data2);
wszCLSID_Broken[3] = '\0'; memset(&clsid, 0xcc, sizeof(CLSID)); hr = CLSIDFromString(wszCLSID_Broken, &clsid); - ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr); + ok(hr == CO_E_CLASSSTRING, "Got %08lx\n", hr); ok(clsid.Data1 == 0xb, "Got %s\n", debugstr_guid(&clsid)); ok(clsid.Data2 == 0xcccc, "Got %04x\n", clsid.Data2); } @@ -584,51 +584,51 @@ static void test_IIDFromString(void) IID iid;
hr = IIDFromString(wszCLSID_StdFont, &iid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualIID(&iid, &CLSID_StdFont), "got iid %s\n", wine_dbgstr_guid(&iid));
memset(&iid, 0xab, sizeof(iid)); hr = IIDFromString(NULL, &iid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualIID(&iid, &CLSID_NULL), "got iid %s\n", wine_dbgstr_guid(&iid));
hr = IIDFromString(cfW, &iid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualIID(&iid, &IID_IClassFactory), "got iid %s\n", wine_dbgstr_guid(&iid));
/* string starts with a valid IID but is longer */ memset(&iid, 0xab, sizeof(iid)); hr = IIDFromString(cf_brokenW, &iid); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(iid.Data1 == 0xabababab, "Got %s\n", debugstr_guid(&iid));
/* invalid IID in a valid format */ memset(&iid, 0xab, sizeof(iid)); hr = IIDFromString(brokenW, &iid); - ok(hr == CO_E_IIDSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_IIDSTRING, "got 0x%08lx\n", hr); ok(iid.Data1 == 0x00000001, "Got %s\n", debugstr_guid(&iid));
memset(&iid, 0xab, sizeof(iid)); hr = IIDFromString(broken2W, &iid); - ok(hr == CO_E_IIDSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_IIDSTRING, "got 0x%08lx\n", hr); ok(iid.Data1 == 0x00000001, "Got %s\n", debugstr_guid(&iid));
/* format is broken, but string length is okay */ memset(&iid, 0xab, sizeof(iid)); hr = IIDFromString(broken3W, &iid); - ok(hr == CO_E_IIDSTRING, "got 0x%08x\n", hr); + ok(hr == CO_E_IIDSTRING, "got 0x%08lx\n", hr); ok(iid.Data1 == 0xabababab, "Got %s\n", debugstr_guid(&iid));
/* invalid string */ memset(&iid, 0xab, sizeof(iid)); hr = IIDFromString(wszNonExistent, &iid); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(iid.Data1 == 0xabababab, "Got %s\n", debugstr_guid(&iid));
/* valid ProgID */ memset(&iid, 0xab, sizeof(iid)); hr = IIDFromString(stdfont, &iid); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(iid.Data1 == 0xabababab, "Got %s\n", debugstr_guid(&iid)); }
@@ -641,7 +641,7 @@ static void test_StringFromGUID2(void) SetLastError(0xdeadbeef); len = StringFromGUID2(NULL,str,50); ok(len == 0, "len: %d (expected 0)\n", len); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %lx\n", GetLastError());
/* Test corner cases for buffer size */ len = StringFromGUID2(&CLSID_StdFont,str,50); @@ -672,7 +672,7 @@ static void _test_apt_type(APTTYPE expected_type, APTTYPEQUALIFIER expected_qual
hr = pCoGetApartmentType(&type, &qualifier); ok_(__FILE__, line)(hr == S_OK || (type == APTTYPE_CURRENT && hr == CO_E_NOTINITIALIZED), - "Unexpected hr %#x.\n", hr); + "Unexpected hr %#lx.\n", hr); ok_(__FILE__, line)(type == expected_type, "Wrong apartment type %d, expected %d\n", type, expected_type); ok_(__FILE__, line)(qualifier == expected_qualifier, "Wrong apartment qualifier %d, expected %d\n", qualifier, expected_qualifier); @@ -686,20 +686,20 @@ static void test_CoCreateInstance(void)
pUnk = (IUnknown *)0xdeadbeef; hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr); ok(pUnk == NULL, "CoCreateInstance should have changed the passed in pointer to NULL, instead of %p\n", pUnk);
OleInitialize(NULL);
/* test errors returned for non-registered clsids */ hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered inproc server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered inproc server should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr); hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered inproc handler should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered inproc handler should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr); hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_LOCAL_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered local server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered local server should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr); hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_REMOTE_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered remote server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered remote server should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr);
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); if(hr == REGDB_E_CLASSNOTREG) @@ -714,7 +714,7 @@ static void test_CoCreateInstance(void) OleUninitialize();
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE); } @@ -752,13 +752,13 @@ static void test_CoGetClassObject(void) LONG res;
hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoGetClassObject should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "CoGetClassObject should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr); ok(pUnk == NULL, "CoGetClassObject should have changed the passed in pointer to NULL, instead of %p\n", pUnk);
hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, NULL); ok(hr == E_INVALIDARG || broken(hr == CO_E_NOTINITIALIZED), /* win9x */ - "CoGetClassObject should have returned E_INVALIDARG instead of 0x%08x\n", hr); + "CoGetClassObject should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE);
@@ -777,37 +777,37 @@ static void test_CoGetClassObject(void)
res = RegCreateKeyExA(HKEY_CURRENT_USER, "Software\Classes", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL); - ok(!res, "RegCreateKeyEx returned %d\n", res); + ok(!res, "RegCreateKeyEx returned %ld\n", res);
res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, hkey); - ok(!res, "RegOverridePredefKey returned %d\n", res); + ok(!res, "RegOverridePredefKey returned %ld\n", res);
hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(hr == S_OK, "CoGetClassObject should have returned S_OK instead of 0x%08x\n", hr); + ok(hr == S_OK, "CoGetClassObject should have returned S_OK instead of 0x%08lx\n", hr);
res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, NULL); - ok(!res, "RegOverridePredefKey returned %d\n", res); + ok(!res, "RegOverridePredefKey returned %ld\n", res);
if (hr == S_OK) IUnknown_Release(pUnk); RegCloseKey(hkey); }
hr = CoGetClassObject(&CLSID_InProcFreeMarshaler, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IUnknown_Release(pUnk);
/* context redefines FreeMarshaler CLSID */ if ((handle = activate_context(actctx_manifest, &cookie))) { hr = CoGetClassObject(&CLSID_InProcFreeMarshaler, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IUnknown_Release(pUnk);
hr = CoGetClassObject(&IID_Testiface7, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(hr == 0x80001235 || broken(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) /* winxp */, "Unexpected hr %#x.\n", hr); + ok(hr == 0x80001235 || broken(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) /* winxp */, "Unexpected hr %#lx.\n", hr);
hr = CoGetClassObject(&IID_Testiface8, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#x.\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
deactivate_context(handle, cookie); } @@ -820,10 +820,10 @@ static void test_CoGetClassObject(void)
/* This one will load test dll and get back specific error code. */ hr = CoGetClassObject(&IID_Testiface7, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(hr == 0x80001235 || broken(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) /* winxp */, "Unexpected hr %#x.\n", hr); + ok(hr == 0x80001235 || broken(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) /* winxp */, "Unexpected hr %#lx.\n", hr);
hr = CoGetClassObject(&IID_Testiface8, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
memset(&data, 0, sizeof(data)); data.cbSize = sizeof(data); @@ -876,7 +876,7 @@ static void test_CoCreateInstanceEx(void)
create_instance_iid = IID_NULL; hr = CoCreateInstanceEx(&CLSID_WineOOPTest, NULL, CLSCTX_INPROC_SERVER, NULL, 1, &qi_res); - ok(hr == E_NOINTERFACE, "CoCreateInstanceEx failed: %08x\n", hr); + ok(hr == E_NOINTERFACE, "CoCreateInstanceEx failed: %08lx\n", hr); ok(IsEqualGUID(&create_instance_iid, qi_res.pIID), "Unexpected CreateInstance iid %s\n", wine_dbgstr_guid(&create_instance_iid));
@@ -994,14 +994,14 @@ static void test_CoRegisterMessageFilter(void)
hr = CoRegisterMessageFilter(&MessageFilter, &prev_filter); ok(hr == CO_E_NOT_SUPPORTED, - "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x\n", + "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08lx\n", hr);
CoInitializeEx(NULL, COINIT_MULTITHREADED); prev_filter = (IMessageFilter *)0xdeadbeef; hr = CoRegisterMessageFilter(&MessageFilter, &prev_filter); ok(hr == CO_E_NOT_SUPPORTED, - "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x\n", + "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08lx\n", hr); ok(prev_filter == (IMessageFilter *)0xdeadbeef, "prev_filter should have been set to %p\n", prev_filter); @@ -1223,7 +1223,7 @@ static void test_CoRegisterPSClsid(void) DWORD tid;
hr = CoRegisterPSClsid(&IID_IWineTest, &CLSID_WineTestPSFactoryBuffer); - ok(hr == CO_E_NOTINITIALIZED, "CoRegisterPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "CoRegisterPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
@@ -1240,7 +1240,7 @@ static void test_CoRegisterPSClsid(void) wine_dbgstr_guid(&CLSID_WineTestPSFactoryBuffer), wine_dbgstr_guid(&clsid));
thread = CreateThread(NULL, 0, register_ps_clsid_thread, NULL, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with error %ld\n", GetLastError()); ok(!WaitForSingleObject(thread, 10000), "wait timed out\n"); CloseHandle(thread);
@@ -1254,7 +1254,7 @@ static void test_CoRegisterPSClsid(void)
SET_EXPECT(CreateStub); hr = CoMarshalInterface(stream, &IID_IWineTest, &Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_NOTIMPL, "CoMarshalInterface should have returned E_NOTIMPL instead of 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "CoMarshalInterface should have returned E_NOTIMPL instead of 0x%08lx\n", hr); CHECK_CALLED(CreateStub, 1);
hr = CoGetPSClsid(&IID_IEnumOLEVERB, &clsid); @@ -1268,11 +1268,11 @@ static void test_CoRegisterPSClsid(void)
SET_EXPECT(CreateStub); hr = CoMarshalInterface(stream, &IID_IEnumOLEVERB, (IUnknown*)&EnumOLEVERB, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == S_OK, "CoMarshalInterface should have returned S_OK instead of 0x%08x\n", hr); + ok(hr == S_OK, "CoMarshalInterface should have returned S_OK instead of 0x%08lx\n", hr); CHECK_CALLED(CreateStub, 1);
hr = CoMarshalInterface(stream, &IID_IEnumOLEVERB, &Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == S_OK, "CoMarshalInterface should have returned S_OK instead of 0x%08x\n", hr); + ok(hr == S_OK, "CoMarshalInterface should have returned S_OK instead of 0x%08lx\n", hr);
IStream_Release(stream); IPSFactoryBuffer_Release(ps_factory_buffer); @@ -1286,10 +1286,10 @@ static void test_CoRegisterPSClsid(void) CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoGetPSClsid(&IID_IWineTest, &clsid); - ok(hr == REGDB_E_IIDNOTREG, "CoGetPSClsid should have returned REGDB_E_IIDNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_IIDNOTREG, "CoGetPSClsid should have returned REGDB_E_IIDNOTREG instead of 0x%08lx\n", hr);
hr = CoGetPSClsid(&IID_TestPS, &clsid); - ok(hr == REGDB_E_IIDNOTREG, "CoGetPSClsid should have returned REGDB_E_IIDNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_IIDNOTREG, "CoGetPSClsid should have returned REGDB_E_IIDNOTREG instead of 0x%08lx\n", hr);
CoUninitialize();
@@ -1304,7 +1304,7 @@ static void test_CoRegisterPSClsid(void) wine_dbgstr_guid(&CLSID_WineTestPSFactoryBuffer), wine_dbgstr_guid(&clsid));
thread = CreateThread(NULL, 0, register_ps_clsid_thread, NULL, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with error %ld\n", GetLastError()); ok(!WaitForSingleObject(thread, 10000), "wait timed out\n"); CloseHandle(thread);
@@ -1329,7 +1329,7 @@ static void test_CoGetPSClsid(void)
hr = CoGetPSClsid(&IID_IClassFactory, &clsid); ok(hr == CO_E_NOTINITIALIZED, - "CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", + "CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1339,12 +1339,12 @@ static void test_CoGetPSClsid(void)
hr = CoGetPSClsid(&IID_IWineTest, &clsid); ok(hr == REGDB_E_IIDNOTREG, - "CoGetPSClsid for random IID returned 0x%08x instead of REGDB_E_IIDNOTREG\n", + "CoGetPSClsid for random IID returned 0x%08lx instead of REGDB_E_IIDNOTREG\n", hr);
hr = CoGetPSClsid(&IID_IClassFactory, NULL); ok(hr == E_INVALIDARG, - "CoGetPSClsid for null clsid returned 0x%08x instead of E_INVALIDARG\n", + "CoGetPSClsid for null clsid returned 0x%08lx instead of E_INVALIDARG\n", hr);
if (!pRegOverridePredefKey) @@ -1358,56 +1358,56 @@ static void test_CoGetPSClsid(void)
res = RegCreateKeyExA(HKEY_CURRENT_USER, "Software\Classes", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL); - ok(!res, "RegCreateKeyEx returned %d\n", res); + ok(!res, "RegCreateKeyEx returned %ld\n", res);
res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, hkey); - ok(!res, "RegOverridePredefKey returned %d\n", res); + ok(!res, "RegOverridePredefKey returned %ld\n", res);
hr = CoGetPSClsid(&IID_IClassFactory, &clsid); ok_ole_success(hr, "CoGetPSClsid");
res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, NULL); - ok(!res, "RegOverridePredefKey returned %d\n", res); + ok(!res, "RegOverridePredefKey returned %ld\n", res);
RegCloseKey(hkey);
/* not registered CLSID */ hr = CoGetPSClsid(&IID_Testiface, &clsid); - ok(hr == REGDB_E_IIDNOTREG, "got 0x%08x\n", hr); + ok(hr == REGDB_E_IIDNOTREG, "got 0x%08lx\n", hr);
if ((handle = activate_context(actctx_manifest, &cookie))) { memset(&clsid, 0, sizeof(clsid)); hr = CoGetPSClsid(&IID_Testiface, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&clsid, &IID_Testiface), "got clsid %s\n", wine_dbgstr_guid(&clsid));
memset(&clsid, 0, sizeof(clsid)); hr = CoGetPSClsid(&IID_Testiface2, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&clsid, &IID_Testiface2), "got clsid %s\n", wine_dbgstr_guid(&clsid));
memset(&clsid, 0, sizeof(clsid)); hr = CoGetPSClsid(&IID_Testiface3, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&clsid, &IID_TestPS), "got clsid %s\n", wine_dbgstr_guid(&clsid));
memset(&clsid, 0xaa, sizeof(clsid)); hr = CoGetPSClsid(&IID_Testiface4, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&clsid, &GUID_NULL), "got clsid %s\n", wine_dbgstr_guid(&clsid));
memset(&clsid, 0xaa, sizeof(clsid)); hr = CoGetPSClsid(&IID_Testiface7, &clsid); - ok(hr == S_OK, "Failed to get PS CLSID, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get PS CLSID, hr %#lx.\n", hr); ok(IsEqualGUID(&clsid, &IID_Testiface7), "Unexpected CLSID %s.\n", wine_dbgstr_guid(&clsid));
/* register same interface and try to get CLSID back */ hr = CoRegisterPSClsid(&IID_Testiface, &IID_Testiface4); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); memset(&clsid, 0, sizeof(clsid)); hr = CoGetPSClsid(&IID_Testiface, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&clsid, &IID_Testiface4), "got clsid %s\n", wine_dbgstr_guid(&clsid));
deactivate_context(handle, cookie); @@ -1424,11 +1424,11 @@ static void test_CoGetPSClsid(void) REGSAM opposite = is_win64 ? KEY_WOW64_32KEY : KEY_WOW64_64KEY;
hr = CoGetPSClsid(&IID_DeadBeef, &clsid); - ok(hr == REGDB_E_IIDNOTREG, "got 0x%08x\n", hr); + ok(hr == REGDB_E_IIDNOTREG, "got 0x%08lx\n", hr);
res = RegCreateKeyExA(HKEY_CLASSES_ROOT, "Interface", 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &hkey_iface, NULL); - ok(!res, "RegCreateKeyEx returned %d\n", res); + ok(!res, "RegCreateKeyEx returned %ld\n", res); res = RegCreateKeyExA(hkey_iface, clsidDeadBeef, 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &hkey, NULL); if (res == ERROR_ACCESS_DENIED) @@ -1437,12 +1437,12 @@ static void test_CoGetPSClsid(void) goto cleanup; }
- ok(!res, "RegCreateKeyEx returned %d\n", res); + ok(!res, "RegCreateKeyEx returned %ld\n", res); res = RegCreateKeyExA(hkey, "ProxyStubClsid32", 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &hkey_psclsid, NULL); - ok(!res, "RegCreateKeyEx returned %d\n", res); + ok(!res, "RegCreateKeyEx returned %ld\n", res); res = RegSetValueExA(hkey_psclsid, NULL, 0, REG_SZ, (const BYTE *)clsidA, strlen(clsidA)+1); - ok(!res, "RegSetValueEx returned %d\n", res); + ok(!res, "RegSetValueEx returned %ld\n", res); RegCloseKey(hkey_psclsid);
hr = CoGetPSClsid(&IID_DeadBeef, &clsid); @@ -1450,10 +1450,10 @@ static void test_CoGetPSClsid(void) ok(IsEqualGUID(&clsid, &IID_TestPS), "got clsid %s\n", wine_dbgstr_guid(&clsid));
res = pRegDeleteKeyExA(hkey, "ProxyStubClsid32", opposite, 0); - ok(!res, "RegDeleteKeyEx returned %d\n", res); + ok(!res, "RegDeleteKeyEx returned %ld\n", res); RegCloseKey(hkey); res = pRegDeleteKeyExA(hkey_iface, clsidDeadBeef, opposite, 0); - ok(!res, "RegDeleteKeyEx returned %d\n", res); + ok(!res, "RegDeleteKeyEx returned %ld\n", res);
cleanup: RegCloseKey(hkey_iface); @@ -1470,24 +1470,24 @@ static void test_CoUnmarshalInterface(void) HRESULT hr;
hr = CoUnmarshalInterface(NULL, &IID_IUnknown, (void **)&pProxy); - ok(hr == E_INVALIDARG, "CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); ok_ole_success(hr, "CreateStreamOnHGlobal");
hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)&pProxy); todo_wine - ok(hr == CO_E_NOTINITIALIZED, "CoUnmarshalInterface should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "CoUnmarshalInterface should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)&pProxy); - ok(hr == STG_E_READFAULT, "CoUnmarshalInterface should have returned STG_E_READFAULT instead of 0x%08x\n", hr); + ok(hr == STG_E_READFAULT, "CoUnmarshalInterface should have returned STG_E_READFAULT instead of 0x%08lx\n", hr);
CoUninitialize();
hr = CoUnmarshalInterface(pStream, &IID_IUnknown, NULL); - ok(hr == E_INVALIDARG, "CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
IStream_Release(pStream); } @@ -1500,7 +1500,7 @@ static void test_CoGetInterfaceAndReleaseStream(void) CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoGetInterfaceAndReleaseStream(NULL, &IID_IUnknown, (void**)&pUnk); - ok(hr == E_INVALIDARG, "hr %08x\n", hr); + ok(hr == E_INVALIDARG, "hr %08lx\n", hr);
CoUninitialize(); } @@ -1518,17 +1518,17 @@ static void test_CoMarshalInterface(void) ok_ole_success(hr, "CreateStreamOnHGlobal");
hr = CoMarshalInterface(pStream, &IID_IUnknown, NULL, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_INVALIDARG, "CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = CoMarshalInterface(NULL, &IID_IUnknown, (IUnknown *)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_INVALIDARG, "CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = CoMarshalInterface(pStream, &IID_IUnknown, (IUnknown *)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); ok_ole_success(hr, "CoMarshalInterface");
/* stream not rewound */ hr = CoReleaseMarshalData(pStream); - ok(hr == STG_E_READFAULT, "CoReleaseMarshalData should have returned STG_E_READFAULT instead of 0x%08x\n", hr); + ok(hr == STG_E_READFAULT, "CoReleaseMarshalData should have returned STG_E_READFAULT instead of 0x%08lx\n", hr);
hr = IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); ok_ole_success(hr, "IStream_Seek"); @@ -1552,10 +1552,10 @@ static void test_CoMarshalInterThreadInterfaceInStream(void) cLocks = 0;
hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, (IUnknown *)&Test_ClassFactory, NULL); - ok(hr == E_INVALIDARG, "CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, NULL, &pStream); - ok(hr == E_INVALIDARG, "CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
ok_no_locks();
@@ -1657,27 +1657,27 @@ static void test_CoRegisterClassObject(void) /* test that object is accessible */ hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&pcf); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IClassFactory_Release(pcf);
/* context now contains CLSID_WineOOPTest, test if registered one could still be used */ if ((handle = activate_context(actctx_manifest, &ctxcookie))) { hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&pcf); - ok(hr == 0x80001234 || broken(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) /* winxp */, "Unexpected hr %#x.\n", hr); + ok(hr == 0x80001234 || broken(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) /* winxp */, "Unexpected hr %#lx.\n", hr);
deactivate_context(handle, ctxcookie); }
hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&pcf); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IClassFactory_Release(pcf);
hr = CoRevokeClassObject(cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
CoUninitialize(); } @@ -1781,24 +1781,24 @@ static void test_registered_object_thread_affinity(void) ok_ole_success(hr, "CoRegisterClassObject");
thread = CreateThread(NULL, 0, get_class_object_thread, (LPVOID)CLSCTX_INPROC_SERVER, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with error %ld\n", GetLastError()); ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); GetExitCodeThread(thread, &exitcode); hr = exitcode; ok(hr == REGDB_E_CLASSNOTREG, "CoGetClassObject on inproc object " "registered in different thread should return REGDB_E_CLASSNOTREG " - "instead of 0x%08x\n", hr); + "instead of 0x%08lx\n", hr);
hr = get_class_object(CLSCTX_INPROC_SERVER); ok(hr == S_OK, "CoGetClassObject on inproc object registered in same " - "thread should return S_OK instead of 0x%08x\n", hr); + "thread should return S_OK instead of 0x%08lx\n", hr);
thread = CreateThread(NULL, 0, register_class_object_thread, NULL, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with error %ld\n", GetLastError()); ok ( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); GetExitCodeThread(thread, &exitcode); hr = exitcode; - ok(hr == S_OK, "CoRegisterClassObject with same CLSID but in different thread should return S_OK instead of 0x%08x\n", hr); + ok(hr == S_OK, "CoRegisterClassObject with same CLSID but in different thread should return S_OK instead of 0x%08lx\n", hr);
hr = CoRevokeClassObject(cookie); ok_ole_success(hr, "CoRevokeClassObject"); @@ -1810,7 +1810,7 @@ static void test_registered_object_thread_affinity(void) ok_ole_success(hr, "CoRegisterClassObject");
thread = CreateThread(NULL, 0, get_class_object_proxy_thread, (LPVOID)CLSCTX_LOCAL_SERVER, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with error %ld\n", GetLastError()); while (MsgWaitForMultipleObjects(1, &thread, FALSE, 10000, QS_ALLINPUT) == WAIT_OBJECT_0 + 1) { MSG msg; @@ -1824,27 +1824,27 @@ static void test_registered_object_thread_affinity(void) hr = exitcode; ok(hr == S_OK, "CoGetClassObject on local server object " "registered in different thread should return S_OK " - "instead of 0x%08x\n", hr); + "instead of 0x%08lx\n", hr);
hr = get_class_object(CLSCTX_LOCAL_SERVER); ok(hr == S_OK, "CoGetClassObject on local server object registered in same " - "thread should return S_OK instead of 0x%08x\n", hr); + "thread should return S_OK instead of 0x%08lx\n", hr);
thread = CreateThread(NULL, 0, revoke_class_object_thread, (LPVOID)(DWORD_PTR)cookie, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with error %ld\n", GetLastError()); ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); GetExitCodeThread(thread, &exitcode); hr = exitcode; ok(hr == RPC_E_WRONG_THREAD || broken(hr == S_OK) /* win8 */, "CoRevokeClassObject called from different " - "thread to where registered should return RPC_E_WRONG_THREAD instead of 0x%08x\n", hr); + "thread to where registered should return RPC_E_WRONG_THREAD instead of 0x%08lx\n", hr);
thread = CreateThread(NULL, 0, register_class_object_thread, NULL, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed with error %ld\n", GetLastError()); ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); GetExitCodeThread(thread, &exitcode); hr = exitcode; ok(hr == S_OK, "CoRegisterClassObject with same CLSID but in different " - "thread should return S_OK instead of 0x%08x\n", hr); + "thread should return S_OK instead of 0x%08lx\n", hr);
hr = CoRevokeClassObject(cookie); ok_ole_success(hr, "CoRevokeClassObject"); @@ -1924,7 +1924,7 @@ static void test_CoGetObjectContext(void) }
hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); - ok(hr == CO_E_NOTINITIALIZED, "CoGetObjectContext should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "CoGetObjectContext should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", hr); ok(pComThreadingInfo == NULL, "pComThreadingInfo should have been set to NULL\n");
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1936,16 +1936,16 @@ static void test_CoGetObjectContext(void)
threadinginfo2 = NULL; hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&threadinginfo2); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got 0x%08lx\n", hr); ok(pComThreadingInfo == threadinginfo2, "got different instance\n"); IComThreadingInfo_Release(threadinginfo2);
hr = IComThreadingInfo_GetCurrentLogicalThreadId(pComThreadingInfo, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
id = id2 = GUID_NULL; hr = IComThreadingInfo_GetCurrentLogicalThreadId(pComThreadingInfo, &id); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoGetCurrentLogicalThreadId(&id2); ok(IsEqualGUID(&id, &id2), "got %s, expected %s\n", wine_dbgstr_guid(&id), wine_dbgstr_guid(&id2)); @@ -1959,13 +1959,13 @@ static void test_CoGetObjectContext(void) ok(thdtype == THDTYPE_PROCESSMESSAGES, "thread type should be THDTYPE_PROCESSMESSAGES instead of %d\n", thdtype);
refs = IComThreadingInfo_Release(pComThreadingInfo); - ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %d refs\n", refs); + ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %ld refs\n", refs);
hr = pCoGetObjectContext(&IID_IContextCallback, (void **)&pContextCallback); ok_ole_success(hr, "CoGetObjectContext(ContextCallback)");
refs = IContextCallback_Release(pContextCallback); - ok(refs == 0, "pContextCallback should have 0 refs instead of %d refs\n", refs); + ok(refs == 0, "pContextCallback should have 0 refs instead of %ld refs\n", refs);
CoUninitialize();
@@ -1983,19 +1983,19 @@ static void test_CoGetObjectContext(void) ok(thdtype == THDTYPE_BLOCKMESSAGES, "thread type should be THDTYPE_BLOCKMESSAGES instead of %d\n", thdtype);
refs = IComThreadingInfo_Release(pComThreadingInfo); - ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %d refs\n", refs); + ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %ld refs\n", refs);
hr = pCoGetObjectContext(&IID_IContextCallback, (void **)&pContextCallback); ok_ole_success(hr, "CoGetObjectContext(ContextCallback)");
refs = IContextCallback_Release(pContextCallback); - ok(refs == 0, "pContextCallback should have 0 refs instead of %d refs\n", refs); + ok(refs == 0, "pContextCallback should have 0 refs instead of %ld refs\n", refs);
hr = pCoGetObjectContext(&IID_IObjContext, (void **)&pObjContext); ok_ole_success(hr, "CoGetObjectContext");
refs = IObjContext_Release(pObjContext); - ok(refs == 0, "pObjContext should have 0 refs instead of %d refs\n", refs); + ok(refs == 0, "pObjContext should have 0 refs instead of %ld refs\n", refs);
CoUninitialize(); } @@ -2070,14 +2070,14 @@ static void test_CoGetCallContext(void) test_object->refs = 1;
hr = CoGetCallContext(&IID_IUnknown, (void**)&pUnk); - ok(hr == RPC_E_CALL_COMPLETE, "Expected RPC_E_CALL_COMPLETE, got 0x%08x\n", hr); + ok(hr == RPC_E_CALL_COMPLETE, "Expected RPC_E_CALL_COMPLETE, got 0x%08lx\n", hr);
pUnk = (IUnknown*)0xdeadbeef; hr = pCoSwitchCallContext(&test_object->IUnknown_iface, &pUnk); ok_ole_success(hr, "CoSwitchCallContext"); ok(pUnk == NULL, "expected NULL, got %p\n", pUnk); refs = IUnknown_AddRef(&test_object->IUnknown_iface); - ok(refs == 2, "Expected refcount 2, got %d\n", refs); + ok(refs == 2, "Expected refcount 2, got %ld\n", refs); IUnknown_Release(&test_object->IUnknown_iface);
pUnk = (IUnknown*)0xdeadbeef; @@ -2086,7 +2086,7 @@ static void test_CoGetCallContext(void) ok(pUnk == &test_object->IUnknown_iface, "expected %p, got %p\n", &test_object->IUnknown_iface, pUnk); refs = IUnknown_AddRef(&test_object->IUnknown_iface); - ok(refs == 3, "Expected refcount 3, got %d\n", refs); + ok(refs == 3, "Expected refcount 3, got %ld\n", refs); IUnknown_Release(&test_object->IUnknown_iface); IUnknown_Release(pUnk);
@@ -2096,11 +2096,11 @@ static void test_CoGetCallContext(void) ok(pUnk == &test_object->IUnknown_iface, "expected %p, got %p\n", &test_object->IUnknown_iface, pUnk); refs = IUnknown_AddRef(&test_object->IUnknown_iface); - ok(refs == 2, "Expected refcount 2, got %d\n", refs); + ok(refs == 2, "Expected refcount 2, got %ld\n", refs); IUnknown_Release(&test_object->IUnknown_iface);
hr = CoGetCallContext(&IID_IUnknown, (void**)&pUnk); - ok(hr == RPC_E_CALL_COMPLETE, "Expected RPC_E_CALL_COMPLETE, got 0x%08x\n", hr); + ok(hr == RPC_E_CALL_COMPLETE, "Expected RPC_E_CALL_COMPLETE, got 0x%08lx\n", hr);
IUnknown_Release(&test_object->IUnknown_iface);
@@ -2122,8 +2122,8 @@ static void test_CoGetContextToken(void)
token = 0xdeadbeef; hr = pCoGetContextToken(&token); - ok(hr == CO_E_NOTINITIALIZED, "Expected CO_E_NOTINITIALIZED, got 0x%08x\n", hr); - ok(token == 0xdeadbeef, "Expected 0, got 0x%lx\n", token); + ok(hr == CO_E_NOTINITIALIZED, "Expected CO_E_NOTINITIALIZED, got 0x%08lx\n", hr); + ok(token == 0xdeadbeef, "Expected 0, got 0x%Ix\n", token);
test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE);
@@ -2132,49 +2132,49 @@ static void test_CoGetContextToken(void) test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE);
hr = pCoGetContextToken(NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got 0x%08x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER, got 0x%08lx\n", hr);
token = 0; hr = pCoGetContextToken(&token); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got 0x%08lx\n", hr); ok(token, "Expected token != 0\n");
token2 = 0; hr = pCoGetContextToken(&token2); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got 0x%08lx\n", hr); ok(token2 == token, "got different token\n");
refs = IUnknown_AddRef((IUnknown *)token); - ok(refs == 1, "Expected 1, got %u\n", refs); + ok(refs == 1, "Expected 1, got %lu\n", refs);
hr = pCoGetObjectContext(&IID_IObjContext, (void **)&ctx); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got 0x%08lx\n", hr); ok(ctx == (IObjContext *)token, "Expected interface pointers to be the same\n");
refs = IObjContext_AddRef(ctx); - ok(refs == 3, "Expected 3, got %u\n", refs); + ok(refs == 3, "Expected 3, got %lu\n", refs);
refs = IObjContext_Release(ctx); - ok(refs == 2, "Expected 2, got %u\n", refs); + ok(refs == 2, "Expected 2, got %lu\n", refs);
refs = IUnknown_Release((IUnknown *)token); - ok(refs == 1, "Expected 1, got %u\n", refs); + ok(refs == 1, "Expected 1, got %lu\n", refs);
/* CoGetContextToken does not add a reference */ token = 0; hr = pCoGetContextToken(&token); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got 0x%08lx\n", hr); ok(token, "Expected token != 0\n"); ok(ctx == (IObjContext *)token, "Expected interface pointers to be the same\n");
refs = IObjContext_AddRef(ctx); - ok(refs == 2, "Expected 1, got %u\n", refs); + ok(refs == 2, "Expected 1, got %lu\n", refs);
refs = IObjContext_Release(ctx); - ok(refs == 1, "Expected 0, got %u\n", refs); + ok(refs == 1, "Expected 0, got %lu\n", refs);
refs = IObjContext_Release(ctx); - ok(refs == 0, "Expected 0, got %u\n", refs); + ok(refs == 0, "Expected 0, got %lu\n", refs);
CoUninitialize(); } @@ -2190,38 +2190,38 @@ static void test_TreatAsClass(void) LONG lr;
hr = CoGetTreatAsClass(&deadbeef,&out); - ok (hr == S_FALSE, "expected S_FALSE got %x\n",hr); + ok (hr == S_FALSE, "expected S_FALSE got %lx\n",hr); ok (IsEqualGUID(&out,&deadbeef), "expected to get same clsid back\n");
hr = CoGetTreatAsClass(NULL, &out); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr); ok(IsEqualGUID(&out, &deadbeef), "expected no change to the clsid\n");
hr = CoGetTreatAsClass(&deadbeef, NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr);
lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_READ, &clsidkey); - ok(!lr, "Couldn't open CLSID key, error %d\n", lr); + ok(!lr, "Couldn't open CLSID key, error %ld\n", lr);
lr = RegCreateKeyExA(clsidkey, deadbeefA, 0, NULL, 0, KEY_WRITE, NULL, &deadbeefkey, NULL); if (lr) { - win_skip("CoGetTreatAsClass() tests will be skipped (failed to create a test key, error %d)\n", lr); + win_skip("CoGetTreatAsClass() tests will be skipped (failed to create a test key, error %ld)\n", lr); RegCloseKey(clsidkey); return; }
hr = CoTreatAsClass(&deadbeef, &deadbeef); - ok(hr == REGDB_E_WRITEREGDB, "CoTreatAsClass gave wrong error: %08x\n", hr); + ok(hr == REGDB_E_WRITEREGDB, "CoTreatAsClass gave wrong error: %08lx\n", hr);
hr = CoTreatAsClass(&deadbeef, &CLSID_FileProtocol); if(hr == REGDB_E_WRITEREGDB){ win_skip("Insufficient privileges to use CoTreatAsClass\n"); goto exit; } - ok(hr == S_OK, "CoTreatAsClass failed: %08x\n", hr); + ok(hr == S_OK, "CoTreatAsClass failed: %08lx\n", hr);
hr = CoGetTreatAsClass(&deadbeef, &out); - ok(hr == S_OK, "CoGetTreatAsClass failed: %08x\n",hr); + ok(hr == S_OK, "CoGetTreatAsClass failed: %08lx\n",hr); ok(IsEqualGUID(&out, &CLSID_FileProtocol), "expected to get substituted clsid\n");
OleInitialize(NULL); @@ -2233,7 +2233,7 @@ static void test_TreatAsClass(void) goto exit; }
- ok(hr == S_OK, "CoCreateInstance failed: %08x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed: %08lx\n", hr); if(pIP){ IInternetProtocol_Release(pIP); pIP = NULL; @@ -2245,29 +2245,29 @@ static void test_TreatAsClass(void)
mqi.pIID = &IID_IInternetProtocol; hr = pCoCreateInstanceFromApp(&deadbeef, NULL, CLSCTX_INPROC_SERVER, NULL, 1, &mqi); - ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#x.\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(&deadbeef, NULL, CLSCTX_INPROC_SERVER | CLSCTX_APPCONTAINER, &IID_IInternetProtocol, (void **)&pIP); - ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#x.\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(&deadbeef, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void **)&pIP); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(pIP); }
hr = CoTreatAsClass(&deadbeef, &CLSID_NULL); - ok(hr == S_OK, "CoTreatAsClass failed: %08x\n", hr); + ok(hr == S_OK, "CoTreatAsClass failed: %08lx\n", hr);
hr = CoGetTreatAsClass(&deadbeef, &out); - ok(hr == S_FALSE, "expected S_FALSE got %08x\n", hr); + ok(hr == S_FALSE, "expected S_FALSE got %08lx\n", hr); ok(IsEqualGUID(&out, &deadbeef), "expected to get same clsid back\n");
/* bizarrely, native's CoTreatAsClass takes some time to take effect in CoCreateInstance */ Sleep(200);
hr = CoCreateInstance(&deadbeef, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void **)&pIP); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance gave wrong error: %08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance gave wrong error: %08lx\n", hr);
if(pIP) IInternetProtocol_Release(pIP); @@ -2284,16 +2284,16 @@ static void test_CoInitializeEx(void) HRESULT hr;
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CoInitializeEx failed with error 0x%08lx\n", hr);
/* Calling OleInitialize for the first time should yield S_OK even with * apartment already initialized by previous CoInitialize(Ex) calls. */ hr = OleInitialize(NULL); - ok(hr == S_OK, "OleInitialize failed with error 0x%08x\n", hr); + ok(hr == S_OK, "OleInitialize failed with error 0x%08lx\n", hr);
/* Subsequent calls to OleInitialize should return S_FALSE */ hr = OleInitialize(NULL); - ok(hr == S_FALSE, "Expected S_FALSE, hr = 0x%08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, hr = 0x%08lx\n", hr);
/* Cleanup */ CoUninitialize(); @@ -2309,59 +2309,59 @@ static void test_OleInitialize_InitCounting(void)
/* 1. OleInitialize fails but OleUninitialize is still called: apartment stays initialized */ hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - ok(hr == S_OK, "CoInitializeEx(COINIT_MULTITHREADED) failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CoInitializeEx(COINIT_MULTITHREADED) failed with error 0x%08lx\n", hr);
hr = OleInitialize(NULL); - ok(hr == RPC_E_CHANGED_MODE, "OleInitialize should have returned 0x%08x instead of 0x%08x\n", RPC_E_CHANGED_MODE, hr); + ok(hr == RPC_E_CHANGED_MODE, "OleInitialize should have returned 0x%08lx instead of 0x%08lx\n", RPC_E_CHANGED_MODE, hr); OleUninitialize();
pUnk = (IUnknown *)0xdeadbeef; hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); - ok(hr == S_OK, "CoCreateInstance should have returned 0x%08x instead of 0x%08x\n", S_OK, hr); + ok(hr == S_OK, "CoCreateInstance should have returned 0x%08lx instead of 0x%08lx\n", S_OK, hr); if (pUnk) IUnknown_Release(pUnk);
CoUninitialize();
/* 2. Extra multiple OleUninitialize: apartment stays initialized until CoUninitialize */ hr = CoInitialize(NULL); - ok(hr == S_OK, "CoInitialize() failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CoInitialize() failed with error 0x%08lx\n", hr);
hr = OleInitialize(NULL); - ok(hr == S_OK, "OleInitialize should have returned 0x%08x instead of 0x%08x\n", S_OK, hr); + ok(hr == S_OK, "OleInitialize should have returned 0x%08lx instead of 0x%08lx\n", S_OK, hr); OleUninitialize(); OleUninitialize(); OleUninitialize();
pUnk = (IUnknown *)0xdeadbeef; hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); - ok(hr == S_OK, "CoCreateInstance should have returned 0x%08x instead of 0x%08x\n", S_OK, hr); + ok(hr == S_OK, "CoCreateInstance should have returned 0x%08lx instead of 0x%08lx\n", S_OK, hr); if (pUnk) IUnknown_Release(pUnk);
CoUninitialize();
pUnk = (IUnknown *)0xdeadbeef; hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned 0x%08x instead of 0x%08x\n", CO_E_NOTINITIALIZED, hr); + ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned 0x%08lx instead of 0x%08lx\n", CO_E_NOTINITIALIZED, hr); if (pUnk) IUnknown_Release(pUnk);
/* 3. CoUninitialize does not formally deinit Ole */ hr = CoInitialize(NULL); - ok(hr == S_OK, "CoInitialize() failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CoInitialize() failed with error 0x%08lx\n", hr);
hr = OleInitialize(NULL); - ok(hr == S_OK, "OleInitialize should have returned 0x%08x instead of 0x%08x\n", S_OK, hr); + ok(hr == S_OK, "OleInitialize should have returned 0x%08lx instead of 0x%08lx\n", S_OK, hr);
CoUninitialize(); CoUninitialize();
pUnk = (IUnknown *)0xdeadbeef; hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned 0x%08x instead of 0x%08x\n", CO_E_NOTINITIALIZED, hr); + ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned 0x%08lx instead of 0x%08lx\n", CO_E_NOTINITIALIZED, hr); /* COM is not initialized anymore */ if (pUnk) IUnknown_Release(pUnk);
hr = OleInitialize(NULL); - ok(hr == S_FALSE, "OleInitialize should have returned 0x%08x instead of 0x%08x\n", S_FALSE, hr); + ok(hr == S_FALSE, "OleInitialize should have returned 0x%08lx instead of 0x%08lx\n", S_FALSE, hr); /* ... but native OleInit returns S_FALSE as if Ole is considered initialized */
OleUninitialize(); @@ -2376,36 +2376,36 @@ static void test_OleRegGetMiscStatus(void) HRESULT hr;
hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
status = 0xdeadbeef; hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, &status); - ok(hr == REGDB_E_CLASSNOTREG, "got 0x%08x\n", hr); - ok(status == 0, "got 0x%08x\n", status); + ok(hr == REGDB_E_CLASSNOTREG, "got 0x%08lx\n", hr); + ok(status == 0, "got 0x%08lx\n", status);
status = -1; hr = OleRegGetMiscStatus(&CLSID_StdFont, DVASPECT_ICON, &status); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(status == 0, "got 0x%08x\n", status); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(status == 0, "got 0x%08lx\n", status);
if ((handle = activate_context(actctx_manifest, &cookie))) { status = 0; hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_ICON, &status); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(status == OLEMISC_RECOMPOSEONRESIZE, "got 0x%08x\n", status); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(status == OLEMISC_RECOMPOSEONRESIZE, "got 0x%08lx\n", status);
/* context data takes precedence over registration info */ status = 0; hr = OleRegGetMiscStatus(&CLSID_StdFont, DVASPECT_ICON, &status); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(status == OLEMISC_RECOMPOSEONRESIZE, "got 0x%08x\n", status); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(status == OLEMISC_RECOMPOSEONRESIZE, "got 0x%08lx\n", status);
/* there's no such attribute in context */ status = -1; hr = OleRegGetMiscStatus(&CLSID_Testclass, DVASPECT_DOCPRINT, &status); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(status == 0, "got 0x%08x\n", status); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(status == 0, "got 0x%08lx\n", status);
deactivate_context(handle, cookie); } @@ -2441,19 +2441,19 @@ static void test_OleRegGetUserType(void)
for (form = 0; form <= USERCLASSTYPE_APPNAME+1; form++) { hr = OleRegGetUserType(&CLSID_Testclass, form, NULL); - ok(hr == E_INVALIDARG, "form %u: got 0x%08x\n", form, hr); + ok(hr == E_INVALIDARG, "form %lu: got 0x%08lx\n", form, hr);
str = (void*)0xdeadbeef; hr = OleRegGetUserType(&CLSID_Testclass, form, &str); - ok(hr == REGDB_E_CLASSNOTREG, "form %u: got 0x%08x\n", form, hr); - ok(str == NULL, "form %u: got %p\n", form, str); + ok(hr == REGDB_E_CLASSNOTREG, "form %lu: got 0x%08lx\n", form, hr); + ok(str == NULL, "form %lu: got %p\n", form, str);
/* same string returned for StdFont for all form types */ str = NULL; hr = OleRegGetUserType(&CLSID_StdFont, form, &str); - ok(hr == S_OK, "form %u: got 0x%08x\n", form, hr); + ok(hr == S_OK, "form %lu: got 0x%08lx\n", form, hr); ok(!lstrcmpW(str, stdfont_usertypeW) || !lstrcmpW(str, stdfont2_usertypeW) /* winxp */, - "form %u, got %s\n", form, wine_dbgstr_w(str)); + "form %lu, got %s\n", form, wine_dbgstr_w(str)); CoTaskMemFree(str); }
@@ -2462,15 +2462,15 @@ static void test_OleRegGetUserType(void) for (form = 0; form <= USERCLASSTYPE_APPNAME+1; form++) { str = (void*)0xdeadbeef; hr = OleRegGetUserType(&CLSID_Testclass, form, &str); - ok(hr == REGDB_E_CLASSNOTREG, "form %u: got 0x%08x\n", form, hr); - ok(str == NULL, "form %u: got %s\n", form, wine_dbgstr_w(str)); + ok(hr == REGDB_E_CLASSNOTREG, "form %lu: got 0x%08lx\n", form, hr); + ok(str == NULL, "form %lu: got %s\n", form, wine_dbgstr_w(str));
/* same string returned for StdFont for all form types */ str = NULL; hr = OleRegGetUserType(&CLSID_StdFont, form, &str); - ok(hr == S_OK, "form %u: got 0x%08x\n", form, hr); + ok(hr == S_OK, "form %lu: got 0x%08lx\n", form, hr); ok(!lstrcmpW(str, stdfont_usertypeW) || !lstrcmpW(str, stdfont2_usertypeW) /* winxp */, - "form %u, got %s\n", form, wine_dbgstr_w(str)); + "form %lu, got %s\n", form, wine_dbgstr_w(str)); CoTaskMemFree(str); }
@@ -2494,13 +2494,13 @@ static void test_OleRegGetUserType(void) return; }
- ok(!ret, "failed to create a key, error %d\n", ret); + ok(!ret, "failed to create a key, error %ld\n", ret);
ret = RegSetValueExW(classkey, NULL, 0, REG_SZ, (const BYTE*)defvalueW, sizeof(defvalueW)); - ok(!ret, "got error %d\n", ret); + ok(!ret, "got error %ld\n", ret);
ret = RegCreateKeyExA(classkey, "AuxUserType", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &auxhkey, NULL); - ok(!ret, "got error %d\n", ret); + ok(!ret, "got error %ld\n", ret);
/* populate AuxUserType */ for (i = 0; i <= 4; i++) { @@ -2508,46 +2508,46 @@ static void test_OleRegGetUserType(void)
sprintf(name, "AuxUserType\%d", i); ret = RegCreateKeyExA(classkey, name, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL); - ok(!ret, "got error %d\n", ret); + ok(!ret, "got error %ld\n", ret);
ret = RegSetValueExA(hkey, NULL, 0, REG_SZ, (const BYTE*)auxvalues[i], strlen(auxvalues[i])); - ok(!ret, "got error %d\n", ret); + ok(!ret, "got error %ld\n", ret); RegCloseKey(hkey); }
str = NULL; hr = OleRegGetUserType(&CLSID_non_existent, 0, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, auxvalue0W), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str);
str = NULL; hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_FULL, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, defvalueW), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str);
str = NULL; hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_SHORT, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, auxvalue2W), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str);
str = NULL; hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_APPNAME, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, auxvalue3W), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str);
str = NULL; hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_APPNAME+1, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, auxvalue4W), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str);
str = NULL; hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_APPNAME+2, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, defvalueW), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str);
@@ -2572,7 +2572,7 @@ static void test_CoCreateGuid(void) HRESULT hr;
hr = CoCreateGuid(NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); }
static void CALLBACK apc_test_proc(ULONG_PTR param) @@ -2650,7 +2650,7 @@ static void _cowait_msgs_expect_queued(unsigned line, HWND hwnd, UINT expected_m BOOL success;
success = PeekMessageA(&msg, hwnd, expected_msg, expected_msg, PM_REMOVE); - ok_(__FILE__,line)(success, "PeekMessageA failed: %u\n", GetLastError()); + ok_(__FILE__,line)(success, "PeekMessageA failed: %lu\n", GetLastError()); if(success) ok_(__FILE__,line)(msg.message == expected_msg, "unexpected message %u, expected %u\n", msg.message, expected_msg); @@ -2683,13 +2683,13 @@ static DWORD CALLBACK cowait_unmarshal_thread(void *arg)
zero.QuadPart = 0; hr = IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "Seek failed: %08x\n", hr); + ok(hr == S_OK, "Seek failed: %08lx\n", hr);
hr = CoUnmarshalInterface(stream, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "CoUnmarshalInterface failed: %08x\n", hr); + ok(hr == S_OK, "CoUnmarshalInterface failed: %08lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IEnumOLEVERB, (void**)&enum_verb); - ok(hr == S_OK, "QueryInterface failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface failed: %08lx\n", hr);
IEnumOLEVERB_Release(enum_verb); IUnknown_Release(unk); @@ -2711,24 +2711,24 @@ static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg) int ret;
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CoInitializeEx failed with error 0x%08lx\n", hr);
hWnd = CreateWindowExA(0, cls_name, "Test (thread)", WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); - ok(hWnd != 0, "CreateWindowExA failed %u\n", GetLastError()); + ok(hWnd != 0, "CreateWindowExA failed %lu\n", GetLastError());
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index==0 || index==0xdeadbeef/* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index==0 || index==0xdeadbeef/* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_USER, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index==0 || index==0xdeadbeef/* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index==0 || index==0xdeadbeef/* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_USER, WM_USER, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
@@ -2738,8 +2738,8 @@ static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg) PostMessageA(NULL, uMSG, 0, 0);
hr = CoWaitForMultipleHandles(COWAIT_ALERTABLE, 50, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index);
/* Make sure message was peeked at */ ret = MsgWaitForMultipleObjectsEx(0, NULL, 2, QS_ALLPOSTMESSAGE, MWMO_ALERTABLE); @@ -2753,13 +2753,13 @@ static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg) CoUninitialize();
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CoInitializeEx failed with error 0x%08lx\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hr); + ok(hr == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hr);
hr = CoMarshalInterface(stream, &IID_IUnknown, &Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == S_OK, "CoMarshalInterface should have returned S_OK instead of 0x%08x\n", hr); + ok(hr == S_OK, "CoMarshalInterface should have returned S_OK instead of 0x%08lx\n", hr);
event = CreateEventW(NULL, TRUE, FALSE, NULL);
@@ -2767,19 +2767,19 @@ static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg) PostThreadMessageW(GetCurrentThreadId(), WM_QUIT, 0, 0);
hr = CoRegisterMessageFilter(&MessageFilter, NULL); - ok(hr == S_OK, "CoRegisterMessageFilter failed: %08x\n", hr); + ok(hr == S_OK, "CoRegisterMessageFilter failed: %08lx\n", hr);
thread = CreateThread(NULL, 0, cowait_unmarshal_thread, stream, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(0, 50, 1, &event, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); hr = CoWaitForMultipleHandles(0, 200, 1, &thread, &index); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(index == WAIT_OBJECT_0, "cowait_unmarshal_thread didn't finish\n"); CloseHandle(thread);
hr = CoRegisterMessageFilter(NULL, NULL); - ok(hr == S_OK, "CoRegisterMessageFilter failed: %08x\n", hr); + ok(hr == S_OK, "CoRegisterMessageFilter failed: %08lx\n", hr);
IStream_Release(stream);
@@ -2799,7 +2799,7 @@ static void test_CoWaitForMultipleHandles(void) MSG msg;
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr); + ok(hr == S_OK, "CoInitializeEx failed with error 0x%08lx\n", hr);
memset(&wc, 0, sizeof(wc)); wc.cbSize = sizeof(wc); @@ -2810,60 +2810,60 @@ static void test_CoWaitForMultipleHandles(void) wc.lpszClassName = cls_name; wc.lpfnWndProc = cowait_window_proc; success = RegisterClassExA(&wc) != 0; - ok(success, "RegisterClassExA failed %u\n", GetLastError()); + ok(success, "RegisterClassExA failed %lu\n", GetLastError());
hWnd = CreateWindowExA(0, cls_name, "Test", WS_TILEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); - ok(hWnd != 0, "CreateWindowExA failed %u\n", GetLastError()); + ok(hWnd != 0, "CreateWindowExA failed %lu\n", GetLastError()); handles[0] = CreateSemaphoreA(NULL, 1, 1, NULL); - ok(handles[0] != 0, "CreateSemaphoreA failed %u\n", GetLastError()); + ok(handles[0] != 0, "CreateSemaphoreA failed %lu\n", GetLastError()); handles[1] = CreateSemaphoreA(NULL, 1, 1, NULL); - ok(handles[1] != 0, "CreateSemaphoreA failed %u\n", GetLastError()); + ok(handles[1] != 0, "CreateSemaphoreA failed %lu\n", GetLastError());
/* test without flags */
PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 0, handles, NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 0, NULL, &index); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - ok(index == 0, "expected index 0, got %u\n", index); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr); + ok(index == 0, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 0, handles, &index); - ok(hr == RPC_E_NO_SYNC, "expected RPC_E_NO_SYNC, got 0x%08x\n", hr); - ok(index == 0, "expected index 0, got %u\n", index); + ok(hr == RPC_E_NO_SYNC, "expected RPC_E_NO_SYNC, got 0x%08lx\n", hr); + ok(index == 0, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 1, handles, &index); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(index == 0, "expected index 0, got %u\n", index); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); + ok(index == 0, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 2, handles, &index); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(index == 1, "expected index 1, got %u\n", index); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); + ok(index == 1, "expected index 1, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n");
@@ -2871,10 +2871,10 @@ static void test_CoWaitForMultipleHandles(void)
index = 0xdeadbeef; thread = CreateThread(NULL, 0, post_message_thread, hWnd, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n"); index = WaitForSingleObject(thread, 200); @@ -2883,10 +2883,10 @@ static void test_CoWaitForMultipleHandles(void)
index = 0xdeadbeef; thread = CreateThread(NULL, 0, send_message_thread, hWnd, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n"); index = WaitForSingleObject(thread, 200); @@ -2901,16 +2901,16 @@ static void test_CoWaitForMultipleHandles(void) index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(COWAIT_WAITALL, 50, 2, handles, &index); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(index == 0, "expected index 0, got %u\n", index); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); + ok(index == 0, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 50, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n");
@@ -2922,34 +2922,34 @@ static void test_CoWaitForMultipleHandles(void) index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(COWAIT_ALERTABLE, 50, 1, handles, &index); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(index == 0, "expected index 0, got %u\n", index); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); + ok(index == 0, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(COWAIT_ALERTABLE, 50, 2, handles, &index); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(index == 1, "expected index 1, got %u\n", index); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); + ok(index == 1, "expected index 1, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(COWAIT_ALERTABLE, 50, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n");
index = 0xdeadbeef; PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); success = QueueUserAPC(apc_test_proc, GetCurrentThread(), 0); - ok(success, "QueueUserAPC failed %u\n", GetLastError()); + ok(success, "QueueUserAPC failed %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(COWAIT_ALERTABLE, 50, 2, handles, &index); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(index == WAIT_IO_COMPLETION, "expected index WAIT_IO_COMPLETION, got %u\n", index); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); + ok(index == WAIT_IO_COMPLETION, "expected index WAIT_IO_COMPLETION, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(success, "CoWaitForMultipleHandles unexpectedly pumped messages\n");
@@ -2960,8 +2960,8 @@ static void test_CoWaitForMultipleHandles(void) success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_NOREMOVE); ok(success, "PeekMessageA returned FALSE\n"); hr = CoWaitForMultipleHandles(0, 50, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n");
@@ -2970,12 +2970,12 @@ static void test_CoWaitForMultipleHandles(void) success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_NOREMOVE); ok(success, "PeekMessageA returned FALSE\n"); thread = CreateThread(NULL, 0, release_semaphore_thread, handles[1], 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(COWAIT_INPUTAVAILABLE, 50, 2, handles, &index); ok(hr == RPC_S_CALLPENDING || broken(hr == E_INVALIDARG) || broken(hr == S_OK) /* Win 8 */, - "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); + "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); if (hr != S_OK) ReleaseSemaphore(handles[1], 1, NULL); - ok(index == 0 || broken(index == 1) /* Win 8 */, "expected index 0, got %u\n", index); + ok(index == 0 || broken(index == 1) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success || broken(success && hr == E_INVALIDARG), "CoWaitForMultipleHandles didn't pump any messages\n"); @@ -2989,10 +2989,10 @@ static void test_CoWaitForMultipleHandles(void) PostMessageA(hWnd, WM_USER+1, 0, 0); PostMessageA(hWnd, WM_DDE_FIRST+1, 0, 0); thread = CreateThread(NULL, 0, send_and_post_user_message_thread, hWnd, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError());
hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr);
cowait_msgs_expect_notified(WM_DDE_FIRST); cowait_msgs_expect_notified(WM_DDE_FIRST+1); @@ -3011,9 +3011,9 @@ static void test_CoWaitForMultipleHandles(void) PostMessageA(hWnd, WM_QUIT, 40, 0); memset(&msg, 0, sizeof(msg)); success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE); - ok(success, "PeekMessageA failed, error %u\n", GetLastError()); + ok(success, "PeekMessageA failed, error %lu\n", GetLastError()); ok(msg.message == WM_QUIT, "expected msg.message = WM_QUIT, got %u\n", msg.message); - ok(msg.wParam == 40, "expected msg.wParam = 40, got %lu\n", msg.wParam); + ok(msg.wParam == 40, "expected msg.wParam = 40, got %Iu\n", msg.wParam); success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE); ok(!success, "PeekMessageA succeeded\n");
@@ -3024,10 +3024,10 @@ static void test_CoWaitForMultipleHandles(void) PostMessageA(hWnd, WM_USER+1, 0, 0); PostMessageA(hWnd, WM_DDE_FIRST+1, 0, 0); thread = CreateThread(NULL, 0, send_and_post_user_message_thread, hWnd, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError());
hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr);
cowait_msgs_expect_notified(WM_DDE_FIRST); cowait_msgs_expect_notified(WM_DDE_FIRST+1); @@ -3044,13 +3044,13 @@ static void test_CoWaitForMultipleHandles(void) PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); PostMessageA(hWnd, WM_QUIT, 41, 0); thread = CreateThread(NULL, 0, post_message_thread, hWnd, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); todo_wine - ok(success || broken(!success) /* Win 2000/XP/8 */, "PeekMessageA failed, error %u\n", GetLastError()); + ok(success || broken(!success) /* Win 2000/XP/8 */, "PeekMessageA failed, error %lu\n", GetLastError()); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "PeekMessageA succeeded\n"); memset(&msg, 0, sizeof(msg)); @@ -3060,7 +3060,7 @@ static void test_CoWaitForMultipleHandles(void) if (success) { ok(msg.message == WM_QUIT, "expected msg.message = WM_QUIT, got %u\n", msg.message); - ok(msg.wParam == 41, "expected msg.wParam = 41, got %lu\n", msg.wParam); + ok(msg.wParam == 41, "expected msg.wParam = 41, got %Iu\n", msg.wParam); } index = WaitForSingleObject(thread, 200); ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); @@ -3070,17 +3070,17 @@ static void test_CoWaitForMultipleHandles(void) PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); PostMessageA(hWnd, WM_QUIT, 42, 0); thread = CreateThread(NULL, 0, send_message_thread, hWnd, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(0, 500, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "CoWaitForMultipleHandles didn't pump all WM_DDE_FIRST messages\n"); memset(&msg, 0, sizeof(msg)); success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE); - ok(success, "PeekMessageA failed, error %u\n", GetLastError()); + ok(success, "PeekMessageA failed, error %lu\n", GetLastError()); ok(msg.message == WM_QUIT, "expected msg.message = WM_QUIT, got %u\n", msg.message); - ok(msg.wParam == 42, "expected msg.wParam = 42, got %lu\n", msg.wParam); + ok(msg.wParam == 42, "expected msg.wParam = 42, got %Iu\n", msg.wParam); index = WaitForSingleObject(thread, 200); ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); CloseHandle(thread); @@ -3088,13 +3088,13 @@ static void test_CoWaitForMultipleHandles(void) PostQuitMessage(43); memset(&msg, 0, sizeof(msg)); success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE); - ok(success || broken(!success) /* Win 8 */, "PeekMessageA failed, error %u\n", GetLastError()); + ok(success || broken(!success) /* Win 8 */, "PeekMessageA failed, error %lu\n", GetLastError()); if (!success) win_skip("PostQuitMessage didn't queue a WM_QUIT message, skipping tests\n"); else { ok(msg.message == WM_QUIT, "expected msg.message = WM_QUIT, got %u\n", msg.message); - ok(msg.wParam == 43, "expected msg.wParam = 43, got %lu\n", msg.wParam); + ok(msg.wParam == 43, "expected msg.wParam = 43, got %Iu\n", msg.wParam); success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE); ok(!success, "PeekMessageA succeeded\n");
@@ -3102,12 +3102,12 @@ static void test_CoWaitForMultipleHandles(void) PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); PostQuitMessage(44); thread = CreateThread(NULL, 0, post_message_thread, hWnd, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); - ok(success, "PeekMessageA failed, error %u\n", GetLastError()); + ok(success, "PeekMessageA failed, error %lu\n", GetLastError()); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "PeekMessageA succeeded\n"); success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE); @@ -3120,12 +3120,12 @@ static void test_CoWaitForMultipleHandles(void) PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); PostQuitMessage(45); thread = CreateThread(NULL, 0, send_message_thread, hWnd, 0, &tid); - ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed, error %lu\n", GetLastError()); hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr); - ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index); + ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08lx\n", hr); + ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %lu\n", index); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); - ok(success, "PeekMessageA failed, error %u\n", GetLastError()); + ok(success, "PeekMessageA failed, error %lu\n", GetLastError()); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); ok(!success, "PeekMessageA succeeded\n"); success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE); @@ -3146,22 +3146,22 @@ static void test_CoWaitForMultipleHandles(void) /* If COM was not initialized, messages are neither pumped nor peeked at */ PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "got %#x\n", hr); + ok(hr == RPC_S_CALLPENDING, "got %#lx\n", hr); success = MsgWaitForMultipleObjectsEx(0, NULL, 2, QS_ALLPOSTMESSAGE, MWMO_ALERTABLE); ok(success == 0, "MsgWaitForMultipleObjects returned %x\n", success); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); - ok(success, "PeekMessage failed: %u\n", GetLastError()); + ok(success, "PeekMessage failed: %lu\n", GetLastError());
/* same in an MTA */ CoInitializeEx(NULL, COINIT_MULTITHREADED);
PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); - ok(hr == RPC_S_CALLPENDING, "got %#x\n", hr); + ok(hr == RPC_S_CALLPENDING, "got %#lx\n", hr); success = MsgWaitForMultipleObjectsEx(0, NULL, 2, QS_ALLPOSTMESSAGE, MWMO_ALERTABLE); ok(success == 0, "MsgWaitForMultipleObjects returned %x\n", success); success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); - ok(success, "PeekMessage failed: %u\n", GetLastError()); + ok(success, "PeekMessage failed: %lu\n", GetLastError());
CoUninitialize();
@@ -3170,7 +3170,7 @@ static void test_CoWaitForMultipleHandles(void) DestroyWindow(hWnd);
success = UnregisterClassA(cls_name, GetModuleHandleA(0)); - ok(success, "UnregisterClass failed %u\n", GetLastError()); + ok(success, "UnregisterClass failed %lu\n", GetLastError()); }
static void test_CoGetMalloc(void) @@ -3186,32 +3186,32 @@ static void test_CoGetMalloc(void)
imalloc = (void*)0xdeadbeef; hr = CoGetMalloc(0, &imalloc); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(imalloc == NULL, "got %p\n", imalloc);
imalloc = (void*)0xdeadbeef; hr = CoGetMalloc(MEMCTX_SHARED, &imalloc); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(imalloc == NULL, "got %p\n", imalloc);
imalloc = (void*)0xdeadbeef; hr = CoGetMalloc(MEMCTX_MACSYSTEM, &imalloc); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(imalloc == NULL, "got %p\n", imalloc);
imalloc = (void*)0xdeadbeef; hr = CoGetMalloc(MEMCTX_UNKNOWN, &imalloc); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(imalloc == NULL, "got %p\n", imalloc);
imalloc = (void*)0xdeadbeef; hr = CoGetMalloc(MEMCTX_SAME, &imalloc); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(imalloc == NULL, "got %p\n", imalloc);
imalloc = NULL; hr = CoGetMalloc(MEMCTX_TASK, &imalloc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(imalloc != NULL, "got %p\n", imalloc);
/* DidAlloc() */ @@ -3255,31 +3255,31 @@ static void test_CoGetApartmentType(void) }
hr = pCoGetApartmentType(NULL, NULL); - ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08lx\n", hr);
type = 0xdeadbeef; hr = pCoGetApartmentType(&type, NULL); - ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08lx\n", hr); ok(type == 0xdeadbeef, "Expected 0xdeadbeef, got %u\n", type);
qualifier = 0xdeadbeef; hr = pCoGetApartmentType(NULL, &qualifier); - ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%08lx\n", hr); ok(qualifier == 0xdeadbeef, "Expected 0xdeadbeef, got %u\n", qualifier);
type = 0xdeadbeef; qualifier = 0xdeadbeef; hr = pCoGetApartmentType(&type, &qualifier); - ok(hr == CO_E_NOTINITIALIZED, "CoGetApartmentType succeeded, error: 0x%08x\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "CoGetApartmentType succeeded, error: 0x%08lx\n", hr); ok(type == APTTYPE_CURRENT, "Expected APTTYPE_CURRENT, got %u\n", type); ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier);
type = 0xdeadbeef; qualifier = 0xdeadbeef; hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(hr == S_OK, "CoInitializeEx failed, error: 0x%08x\n", hr); + ok(hr == S_OK, "CoInitializeEx failed, error: 0x%08lx\n", hr); hr = pCoGetApartmentType(&type, &qualifier); - ok(hr == S_OK, "CoGetApartmentType failed, error: 0x%08x\n", hr); + ok(hr == S_OK, "CoGetApartmentType failed, error: 0x%08lx\n", hr); ok(type == APTTYPE_MAINSTA, "Expected APTTYPE_MAINSTA, got %u\n", type); ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier); CoUninitialize(); @@ -3287,9 +3287,9 @@ static void test_CoGetApartmentType(void) type = 0xdeadbeef; qualifier = 0xdeadbeef; hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - ok(hr == S_OK, "CoInitializeEx failed, error: 0x%08x\n", hr); + ok(hr == S_OK, "CoInitializeEx failed, error: 0x%08lx\n", hr); hr = pCoGetApartmentType(&type, &qualifier); - ok(hr == S_OK, "CoGetApartmentType failed, error: 0x%08x\n", hr); + ok(hr == S_OK, "CoGetApartmentType failed, error: 0x%08lx\n", hr); ok(type == APTTYPE_MTA, "Expected APTTYPE_MTA, got %u\n", type); ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier); CoUninitialize(); @@ -3413,23 +3413,23 @@ static void test_IMallocSpy(void) HRESULT hr;
hr = CoRegisterMallocSpy(NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = CoRevokeMallocSpy(); - ok(hr == CO_E_OBJNOTREG, "got 0x%08x\n", hr); + ok(hr == CO_E_OBJNOTREG, "got 0x%08lx\n", hr);
hr = CoRegisterMallocSpy(&testspy); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoRegisterMallocSpy(NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = CoRegisterMallocSpy(&testspy); - ok(hr == CO_E_OBJISREG, "got 0x%08x\n", hr); + ok(hr == CO_E_OBJISREG, "got 0x%08lx\n", hr);
imalloc = NULL; hr = CoGetMalloc(MEMCTX_TASK, &imalloc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(imalloc != NULL, "got %p\n", imalloc);
IMalloc_Free(imalloc, NULL); @@ -3437,10 +3437,10 @@ static void test_IMallocSpy(void) IMalloc_Release(imalloc);
hr = CoRevokeMallocSpy(); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoRevokeMallocSpy(); - ok(hr == CO_E_OBJNOTREG, "got 0x%08x\n", hr); + ok(hr == CO_E_OBJNOTREG, "got 0x%08lx\n", hr); }
static void test_CoGetCurrentLogicalThreadId(void) @@ -3449,11 +3449,11 @@ static void test_CoGetCurrentLogicalThreadId(void) GUID id;
hr = CoGetCurrentLogicalThreadId(NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
id = GUID_NULL; hr = CoGetCurrentLogicalThreadId(&id); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!IsEqualGUID(&id, &GUID_NULL), "got null id\n"); }
@@ -3487,14 +3487,14 @@ static BOOL revoke_spies_on_uninit; static HRESULT WINAPI testinitialize_PreInitialize(IInitializeSpy *iface, DWORD coinit, DWORD aptrefs) { CHECK_EXPECT2(PreInitialize); - ok(coinit == expected_coinit_flags, "Unexpected init flags %#x, expected %#x.\n", coinit, expected_coinit_flags); + ok(coinit == expected_coinit_flags, "Unexpected init flags %#lx, expected %#lx.\n", coinit, expected_coinit_flags); return S_OK; }
static HRESULT WINAPI testinitialize_PostInitialize(IInitializeSpy *iface, HRESULT hr, DWORD coinit, DWORD aptrefs) { CHECK_EXPECT2(PostInitialize); - ok(coinit == expected_coinit_flags, "Unexpected init flags %#x, expected %#x.\n", coinit, expected_coinit_flags); + ok(coinit == expected_coinit_flags, "Unexpected init flags %#lx, expected %#lx.\n", coinit, expected_coinit_flags); return hr; }
@@ -3505,13 +3505,13 @@ static HRESULT WINAPI testinitialize_PreUninitialize(IInitializeSpy *iface, DWOR if (revoke_spies_on_uninit) { hr = CoRevokeInitializeSpy(init_cookies[0]); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoRevokeInitializeSpy(init_cookies[1]); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoRevokeInitializeSpy(init_cookies[2]); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
revoke_spies_on_uninit = FALSE; } @@ -3542,10 +3542,10 @@ static DWORD WINAPI test_init_spies_proc(void *arg) HRESULT hr;
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE); - ok(hr == S_OK, "Failed to initialize COM, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize COM, hr %#lx.\n", hr);
hr = CoRevokeInitializeSpy(init_cookies[2]); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
CoUninitialize(); return 0; @@ -3558,63 +3558,63 @@ static void test_IInitializeSpy(BOOL mt) if (mt) { hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - ok(hr == S_OK, "CoInitializeEx failed: %#x\n", hr); + ok(hr == S_OK, "CoInitializeEx failed: %#lx\n", hr); }
hr = CoRegisterInitializeSpy(NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
init_cookies[0].QuadPart = 1; hr = CoRegisterInitializeSpy(NULL, &init_cookies[0]); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(init_cookies[0].QuadPart == 1, "got wrong cookie\n");
hr = CoRegisterInitializeSpy(&testinitialize, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
init_cookies[0].HighPart = 0; init_cookies[0].LowPart = 1; hr = CoRegisterInitializeSpy(&testinitialize, &init_cookies[0]); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(init_cookies[0].HighPart == GetCurrentThreadId(), "got high part 0x%08x, expected 0x%08x\n", init_cookies[0].HighPart, + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(init_cookies[0].HighPart == GetCurrentThreadId(), "got high part 0x%08lx, expected 0x%08lx\n", init_cookies[0].HighPart, GetCurrentThreadId()); - if (!mt) ok(init_cookies[0].LowPart == 0, "got wrong low part 0x%x\n", init_cookies[0].LowPart); + if (!mt) ok(init_cookies[0].LowPart == 0, "got wrong low part 0x%lx\n", init_cookies[0].LowPart);
/* register same instance one more time */ init_cookies[1].HighPart = 0; init_cookies[1].LowPart = 0; hr = CoRegisterInitializeSpy(&testinitialize, &init_cookies[1]); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(init_cookies[1].HighPart == GetCurrentThreadId(), "got high part 0x%08x, expected 0x%08x\n", init_cookies[1].HighPart, + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(init_cookies[1].HighPart == GetCurrentThreadId(), "got high part 0x%08lx, expected 0x%08lx\n", init_cookies[1].HighPart, GetCurrentThreadId()); - if (!mt) ok(init_cookies[1].LowPart == 1, "got wrong low part 0x%x\n", init_cookies[1].LowPart); + if (!mt) ok(init_cookies[1].LowPart == 1, "got wrong low part 0x%lx\n", init_cookies[1].LowPart);
init_cookies[2].HighPart = 0; init_cookies[2].LowPart = 0; hr = CoRegisterInitializeSpy(&testinitialize, &init_cookies[2]); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(init_cookies[2].HighPart == GetCurrentThreadId(), "got high part 0x%08x, expected 0x%08x\n", init_cookies[2].HighPart, + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(init_cookies[2].HighPart == GetCurrentThreadId(), "got high part 0x%08lx, expected 0x%08lx\n", init_cookies[2].HighPart, GetCurrentThreadId()); - if (!mt) ok(init_cookies[2].LowPart == 2, "got wrong low part 0x%x\n", init_cookies[2].LowPart); + if (!mt) ok(init_cookies[2].LowPart == 2, "got wrong low part 0x%lx\n", init_cookies[2].LowPart);
hr = CoRevokeInitializeSpy(init_cookies[1]); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoRevokeInitializeSpy(init_cookies[1]); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
init_cookies[1].HighPart = 0; init_cookies[1].LowPart = 0; hr = CoRegisterInitializeSpy(&testinitialize, &init_cookies[1]); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(init_cookies[1].HighPart == GetCurrentThreadId(), "got high part 0x%08x, expected 0x%08x\n", init_cookies[1].HighPart, + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(init_cookies[1].HighPart == GetCurrentThreadId(), "got high part 0x%08lx, expected 0x%08lx\n", init_cookies[1].HighPart, GetCurrentThreadId()); - if (!mt) ok(init_cookies[1].LowPart == 1, "got wrong low part 0x%x\n", init_cookies[1].LowPart); + if (!mt) ok(init_cookies[1].LowPart == 1, "got wrong low part 0x%lx\n", init_cookies[1].LowPart);
SET_EXPECT(PreInitialize); SET_EXPECT(PostInitialize); hr = CoInitializeEx(NULL, expected_coinit_flags = ((mt ? COINIT_MULTITHREADED : COINIT_APARTMENTTHREADED) | COINIT_DISABLE_OLE1DDE)); - ok(hr == (mt ? S_FALSE : S_OK), "Failed to initialize COM, hr %#x.\n", hr); + ok(hr == (mt ? S_FALSE : S_OK), "Failed to initialize COM, hr %#lx.\n", hr); CHECK_CALLED(PreInitialize, 3); CHECK_CALLED(PostInitialize, 3);
@@ -3622,14 +3622,14 @@ static void test_IInitializeSpy(BOOL mt) { HANDLE thread; thread = CreateThread(NULL, 0, test_init_spies_proc, NULL, 0, NULL); - ok(thread != NULL, "CreateThread failed: %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed: %lu\n", GetLastError()); ok(!WaitForSingleObject(thread, 1000), "wait failed\n"); }
SET_EXPECT(PreInitialize); SET_EXPECT(PostInitialize); hr = CoInitializeEx(NULL, expected_coinit_flags = ((mt ? COINIT_MULTITHREADED : COINIT_APARTMENTTHREADED) | COINIT_DISABLE_OLE1DDE)); - ok(hr == S_FALSE, "Failed to initialize COM, hr %#x.\n", hr); + ok(hr == S_FALSE, "Failed to initialize COM, hr %#lx.\n", hr); CHECK_CALLED(PreInitialize, 3); CHECK_CALLED(PostInitialize, 3);
@@ -3657,7 +3657,7 @@ static void test_IInitializeSpy(BOOL mt) SET_EXPECT(PreInitialize); SET_EXPECT(PostInitialize); hr = CoInitializeEx(NULL, expected_coinit_flags = ((mt ? COINIT_MULTITHREADED : COINIT_APARTMENTTHREADED) | COINIT_DISABLE_OLE1DDE)); - ok(hr == S_OK, "Failed to initialize COM, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize COM, hr %#lx.\n", hr); CHECK_CALLED(PreInitialize, 3); CHECK_CALLED(PostInitialize, 3);
@@ -3810,7 +3810,7 @@ static void test_CoGetInstanceFromFile(void) HRESULT hr;
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* CLSID is not specified, file does not exist */ mqi[0].pIID = &IID_IUnknown; @@ -3818,66 +3818,66 @@ static void test_CoGetInstanceFromFile(void) mqi[0].hr = E_NOTIMPL; hr = CoGetInstanceFromFile(NULL, NULL, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 1, mqi); todo_wine - ok(hr == MK_E_CANTOPENFILE, "got 0x%08x\n", hr); + ok(hr == MK_E_CANTOPENFILE, "got 0x%08lx\n", hr); ok(mqi[0].pItf == NULL, "got %p\n", mqi[0].pItf); - ok(mqi[0].hr == E_NOINTERFACE, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == E_NOINTERFACE, "got 0x%08lx\n", mqi[0].hr);
/* class is not available */ mqi[0].pIID = &IID_IUnknown; mqi[0].pItf = NULL; mqi[0].hr = E_NOTIMPL; hr = CoGetInstanceFromFile(NULL, clsid, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 1, mqi); - ok(hr == REGDB_E_CLASSNOTREG, "got 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "got 0x%08lx\n", hr); ok(mqi[0].pItf == NULL, "got %p\n", mqi[0].pItf); - ok(mqi[0].hr == REGDB_E_CLASSNOTREG, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == REGDB_E_CLASSNOTREG, "got 0x%08lx\n", mqi[0].hr);
hr = CoRegisterClassObject(clsid, (IUnknown*)&getinstance_cf, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
mqi[0].pIID = &IID_IUnknown; mqi[0].pItf = (void*)0xdeadbeef; mqi[0].hr = S_OK; hr = CoGetInstanceFromFile(NULL, clsid, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 1, mqi); todo_wine { - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(mqi[0].pItf == (void*)0xdeadbeef, "got %p\n", mqi[0].pItf); } - ok(mqi[0].hr == S_OK, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == S_OK, "got 0x%08lx\n", mqi[0].hr);
mqi[0].pIID = &IID_IUnknown; mqi[0].pItf = (void*)0xdeadbeef; mqi[0].hr = E_NOTIMPL; hr = CoGetInstanceFromFile(NULL, clsid, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 1, mqi); todo_wine { - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(mqi[0].pItf == (void*)0xdeadbeef, "got %p\n", mqi[0].pItf); - ok(mqi[0].hr == E_NOTIMPL, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == E_NOTIMPL, "got 0x%08lx\n", mqi[0].hr); } mqi[0].pIID = &IID_IUnknown; mqi[0].pItf = NULL; mqi[0].hr = E_NOTIMPL; hr = CoGetInstanceFromFile(NULL, clsid, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 1, mqi); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mqi[0].pItf != NULL, "got %p\n", mqi[0].pItf); - ok(mqi[0].hr == S_OK, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == S_OK, "got 0x%08lx\n", mqi[0].hr);
mqi[0].pIID = &IID_IUnknown; mqi[0].pItf = NULL; mqi[0].hr = S_OK; hr = CoGetInstanceFromFile(NULL, clsid, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 1, mqi); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mqi[0].pItf != NULL, "got %p\n", mqi[0].pItf); - ok(mqi[0].hr == S_OK, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == S_OK, "got 0x%08lx\n", mqi[0].hr);
mqi[0].pIID = &IID_IUnknown; mqi[0].pItf = NULL; mqi[0].hr = S_OK; g_persistfile_qi_ret = S_FALSE; hr = CoGetInstanceFromFile(NULL, clsid, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 1, mqi); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(mqi[0].pItf != NULL, "got %p\n", mqi[0].pItf); - ok(mqi[0].hr == S_OK, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == S_OK, "got 0x%08lx\n", mqi[0].hr); g_persistfile_qi_ret = S_OK;
mqi[0].pIID = &IID_IUnknown; @@ -3888,11 +3888,11 @@ todo_wine { mqi[1].hr = S_OK; g_persistfile_qi_ret = 0x8000efef; hr = CoGetInstanceFromFile(NULL, clsid, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 2, mqi); - ok(hr == 0x8000efef, "got 0x%08x\n", hr); + ok(hr == 0x8000efef, "got 0x%08lx\n", hr); ok(mqi[0].pItf == NULL, "got %p\n", mqi[0].pItf); - ok(mqi[0].hr == 0x8000efef, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == 0x8000efef, "got 0x%08lx\n", mqi[0].hr); ok(mqi[1].pItf == NULL, "got %p\n", mqi[1].pItf); - ok(mqi[1].hr == 0x8000efef, "got 0x%08x\n", mqi[1].hr); + ok(mqi[1].hr == 0x8000efef, "got 0x%08lx\n", mqi[1].hr); g_persistfile_qi_ret = S_OK;
mqi[0].pIID = &IID_IUnknown; @@ -3903,15 +3903,15 @@ todo_wine { mqi[1].hr = S_OK; g_persistfile_load_ret = 0x8000fefe; hr = CoGetInstanceFromFile(NULL, clsid, NULL, CLSCTX_INPROC_SERVER, STGM_READ, (OLECHAR*)filenameW, 2, mqi); - ok(hr == 0x8000fefe, "got 0x%08x\n", hr); + ok(hr == 0x8000fefe, "got 0x%08lx\n", hr); ok(mqi[0].pItf == NULL, "got %p\n", mqi[0].pItf); - ok(mqi[0].hr == 0x8000fefe, "got 0x%08x\n", mqi[0].hr); + ok(mqi[0].hr == 0x8000fefe, "got 0x%08lx\n", mqi[0].hr); ok(mqi[1].pItf == NULL, "got %p\n", mqi[1].pItf); - ok(mqi[1].hr == 0x8000fefe, "got 0x%08x\n", mqi[1].hr); + ok(mqi[1].hr == 0x8000fefe, "got 0x%08lx\n", mqi[1].hr); g_persistfile_load_ret = S_OK;
hr = CoRevokeClassObject(cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
CoUninitialize(); } @@ -3926,7 +3926,7 @@ static void test_GlobalOptions(void)
hres = CoCreateInstance(&CLSID_GlobalOptions, NULL, CLSCTX_INPROC_SERVER, &IID_IGlobalOptions, (void**)&global_options); - ok(hres == S_OK || broken(hres == E_NOINTERFACE), "CoCreateInstance(CLSID_GlobalOptions) failed: %08x\n", hres); + ok(hres == S_OK || broken(hres == E_NOINTERFACE), "CoCreateInstance(CLSID_GlobalOptions) failed: %08lx\n", hres); if(FAILED(hres)) { win_skip("CLSID_GlobalOptions not available\n"); @@ -3935,22 +3935,22 @@ static void test_GlobalOptions(void) }
hres = IGlobalOptions_Query(global_options, 0, &value); - ok(FAILED(hres), "Unexpected hr %#x.\n", hres); + ok(FAILED(hres), "Unexpected hr %#lx.\n", hres);
hres = IGlobalOptions_Query(global_options, COMGLB_PROPERTIES_RESERVED3 + 1, &value); - ok(FAILED(hres), "Unexpected hr %#x.\n", hres); + ok(FAILED(hres), "Unexpected hr %#lx.\n", hres);
value = ~0u; hres = IGlobalOptions_Query(global_options, COMGLB_EXCEPTION_HANDLING, &value); - ok(hres == S_OK || broken(hres == E_FAIL) /* Vista */, "Unexpected hr %#x.\n", hres); + ok(hres == S_OK || broken(hres == E_FAIL) /* Vista */, "Unexpected hr %#lx.\n", hres); if (SUCCEEDED(hres)) - ok(value == COMGLB_EXCEPTION_HANDLE, "Unexpected value %ld.\n", value); + ok(value == COMGLB_EXCEPTION_HANDLE, "Unexpected value %Id.\n", value);
IGlobalOptions_Release(global_options);
hres = CoCreateInstance(&CLSID_GlobalOptions, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER, &IID_IGlobalOptions, (void**)&global_options); - ok(hres == E_INVALIDARG, "CoCreateInstance(CLSID_GlobalOptions) failed: %08x\n", hres); + ok(hres == E_INVALIDARG, "CoCreateInstance(CLSID_GlobalOptions) failed: %08lx\n", hres);
CoUninitialize(); } @@ -4014,7 +4014,7 @@ static DWORD CALLBACK implicit_mta_proc(void *param) ok_ole_success(hr, "CoRevokeClassObject");
hr = CoRegisterMessageFilter(NULL, NULL); - ok(hr == CO_E_NOT_SUPPORTED, "got %#x\n", hr); + ok(hr == CO_E_NOT_SUPPORTED, "got %#lx\n", hr);
hr = CoLockObjectExternal(&Test_Unknown, TRUE, TRUE); ok_ole_success(hr, "CoLockObjectExternal"); @@ -4053,7 +4053,7 @@ static void test_CoGetCurrentProcess(void) HANDLE thread;
id = CoGetCurrentProcess(); - ok(!!id && id != GetCurrentProcessId() && id != GetCurrentThreadId(), "Unexpected result %d.\n", id); + ok(!!id && id != GetCurrentProcessId() && id != GetCurrentThreadId(), "Unexpected result %ld.\n", id);
id2 = 0; thread = CreateThread(NULL, 0, co_get_current_process_thread, &id2, 0, NULL); @@ -4079,40 +4079,40 @@ static void test_mta_usage(void)
cookie = 0; hr = pCoIncrementMTAUsage(&cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(cookie != NULL, "Unexpected cookie %p.\n", cookie);
cookie2 = 0; hr = pCoIncrementMTAUsage(&cookie2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(cookie2 != NULL && cookie2 != cookie, "Unexpected cookie %p.\n", cookie2);
test_apt_type(APTTYPE_MTA, APTTYPEQUALIFIER_IMPLICIT_MTA);
hr = pCoDecrementMTAUsage(cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_apt_type(APTTYPE_MTA, APTTYPEQUALIFIER_IMPLICIT_MTA);
hr = pCoDecrementMTAUsage(cookie2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE);
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE);
cookie = 0; hr = pCoIncrementMTAUsage(&cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(cookie != NULL, "Unexpected cookie %p.\n", cookie);
test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE);
hr = pCoDecrementMTAUsage(cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CoUninitialize();
@@ -4152,11 +4152,11 @@ static void test_CoCreateInstanceFromApp(void) memset(&mqi, 0, sizeof(mqi)); mqi.pIID = &IID_IUnknown; hr = pCoCreateInstanceFromApp(supported_classes[i], NULL, CLSCTX_INPROC_SERVER, NULL, 1, &mqi); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(mqi.pItf);
hr = CoCreateInstance(supported_classes[i], NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk); }
@@ -4165,54 +4165,54 @@ static void test_CoCreateInstanceFromApp(void) memset(&mqi, 0, sizeof(mqi)); mqi.pIID = &IID_IUnknown; hr = pCoCreateInstanceFromApp(unsupported_classes[i], NULL, CLSCTX_INPROC_SERVER, NULL, 1, &mqi); - ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#x.\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(unsupported_classes[i], NULL, CLSCTX_INPROC_SERVER | CLSCTX_APPCONTAINER, &IID_IUnknown, (void **)&unk); - ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#x.\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(unsupported_classes[i], NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk); }
/* Locally registered classes are filtered out. */ hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER | CLSCTX_APPCONTAINER, NULL, &IID_IClassFactory, (void **)&unk); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_WineOOPTest, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_WineOOPTest, NULL, CLSCTX_INPROC_SERVER | CLSCTX_APPCONTAINER, &IID_IUnknown, (void **)&unk); - ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#x.\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
memset(&mqi, 0, sizeof(mqi)); mqi.pIID = &IID_IUnknown; hr = pCoCreateInstanceFromApp(&CLSID_WineOOPTest, NULL, CLSCTX_INPROC_SERVER, NULL, 1, &mqi); - ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#x.\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "Unexpected hr %#lx.\n", hr);
hr = CoRevokeClassObject(cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Activation context */ if ((handle = activate_context(actctx_manifest, &actctx_cookie))) { hr = CoCreateInstance(&IID_Testiface7, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == 0x80001235, "Unexpected hr %#x.\n", hr); + ok(hr == 0x80001235, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(&IID_Testiface7, NULL, CLSCTX_INPROC_SERVER | CLSCTX_APPCONTAINER, &IID_IUnknown, (void **)&unk); - ok(hr == 0x80001235, "Unexpected hr %#x.\n", hr); + ok(hr == 0x80001235, "Unexpected hr %#lx.\n", hr);
deactivate_context(handle, actctx_cookie); } @@ -4226,56 +4226,56 @@ static void test_call_cancellation(void)
/* Cancellation is disabled initially. */ hr = CoDisableCallCancellation(NULL); - ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#x.\n", hr); + ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#lx.\n", hr);
hr = CoEnableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoDisableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoDisableCallCancellation(NULL); - ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#x.\n", hr); + ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#lx.\n", hr);
hr = CoEnableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Counter is not affected by initialization. */ hr = CoInitialize(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoDisableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoDisableCallCancellation(NULL); - ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#x.\n", hr); + ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#lx.\n", hr);
hr = CoEnableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CoUninitialize();
hr = CoDisableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoDisableCallCancellation(NULL); - ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#x.\n", hr); + ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#lx.\n", hr);
/* It's cumulative. */ hr = CoEnableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoEnableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoDisableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoDisableCallCancellation(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoDisableCallCancellation(NULL); - ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#x.\n", hr); + ok(hr == CO_E_CANCEL_DISABLED, "Unexpected hr %#lx.\n", hr); }
enum oletlsflags @@ -4307,12 +4307,12 @@ static DWORD CALLBACK oletlsdata_test_thread(void *arg) HRESULT hr;
hr = CoCreateInstance(&CLSID_InternetZoneManager, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk);
/* Flag is not set for implicit MTA. */ flags = get_oletlsflags(); - ok(!(flags & OLETLS_MULTITHREADED), "Unexpected flags %#x.\n", flags); + ok(!(flags & OLETLS_MULTITHREADED), "Unexpected flags %#lx.\n", flags);
return 0; } @@ -4326,47 +4326,47 @@ static void test_oletlsdata(void)
/* STA */ hr = CoInitialize(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); flags = get_oletlsflags(); - ok(flags & OLETLS_APARTMENTTHREADED && !(flags & OLETLS_DISABLE_OLE1DDE), "Unexpected flags %#x.\n", flags); + ok(flags & OLETLS_APARTMENTTHREADED && !(flags & OLETLS_DISABLE_OLE1DDE), "Unexpected flags %#lx.\n", flags); CoUninitialize(); flags = get_oletlsflags(); - ok(!(flags & (OLETLS_APARTMENTTHREADED | OLETLS_MULTITHREADED | OLETLS_DISABLE_OLE1DDE)), "Unexpected flags %#x.\n", flags); + ok(!(flags & (OLETLS_APARTMENTTHREADED | OLETLS_MULTITHREADED | OLETLS_DISABLE_OLE1DDE)), "Unexpected flags %#lx.\n", flags);
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); flags = get_oletlsflags(); - ok(flags & OLETLS_APARTMENTTHREADED && flags & OLETLS_DISABLE_OLE1DDE, "Unexpected flags %#x.\n", flags); + ok(flags & OLETLS_APARTMENTTHREADED && flags & OLETLS_DISABLE_OLE1DDE, "Unexpected flags %#lx.\n", flags); CoUninitialize(); flags = get_oletlsflags(); - ok(!(flags & (OLETLS_APARTMENTTHREADED | OLETLS_MULTITHREADED | OLETLS_DISABLE_OLE1DDE)), "Unexpected flags %#x.\n", flags); + ok(!(flags & (OLETLS_APARTMENTTHREADED | OLETLS_MULTITHREADED | OLETLS_DISABLE_OLE1DDE)), "Unexpected flags %#lx.\n", flags);
/* MTA */ hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); flags = get_oletlsflags(); - ok(flags & OLETLS_MULTITHREADED && flags & OLETLS_DISABLE_OLE1DDE, "Unexpected flags %#x.\n", flags); + ok(flags & OLETLS_MULTITHREADED && flags & OLETLS_DISABLE_OLE1DDE, "Unexpected flags %#lx.\n", flags);
/* Implicit case. */ thread = CreateThread(NULL, 0, oletlsdata_test_thread, NULL, 0, &flags); - ok(thread != NULL, "Failed to create a test thread, error %d.\n", GetLastError()); + ok(thread != NULL, "Failed to create a test thread, error %ld.\n", GetLastError()); ok(!WaitForSingleObject(thread, 5000), "Wait timed out.\n"); CloseHandle(thread);
CoUninitialize(); flags = get_oletlsflags(); - ok(!(flags & (OLETLS_APARTMENTTHREADED | OLETLS_MULTITHREADED | OLETLS_DISABLE_OLE1DDE)), "Unexpected flags %#x.\n", flags); + ok(!(flags & (OLETLS_APARTMENTTHREADED | OLETLS_MULTITHREADED | OLETLS_DISABLE_OLE1DDE)), "Unexpected flags %#lx.\n", flags);
/* Thread ID. */ flags = get_oletlsflags(); - ok(!(flags & OLETLS_UUIDINITIALIZED), "Unexpected flags %#x.\n", flags); + ok(!(flags & OLETLS_UUIDINITIALIZED), "Unexpected flags %#lx.\n", flags);
hr = CoGetCurrentLogicalThreadId(&guid); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
flags = get_oletlsflags(); ok(flags & OLETLS_UUIDINITIALIZED && !(flags & (OLETLS_APARTMENTTHREADED | OLETLS_MULTITHREADED)), - "Unexpected flags %#x.\n", flags); + "Unexpected flags %#lx.\n", flags); }
START_TEST(compobj) diff --git a/dlls/ole32/tests/defaulthandler.c b/dlls/ole32/tests/defaulthandler.c index 83851102ef2..45118295c81 100644 --- a/dlls/ole32/tests/defaulthandler.c +++ b/dlls/ole32/tests/defaulthandler.c @@ -101,30 +101,30 @@ static void test_olestream(void) ole_stream_header_t header;
hr = create_storage(&stg); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IStorage_OpenStream(stg, olestream, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, 0, &stm); - ok(hr == STG_E_FILENOTFOUND, "got %08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "got %08lx\n", hr);
hr = OleCreateDefaultHandler(&non_existent_class, 0, &IID_IOleObject, (void**)&ole_obj); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IOleObject_QueryInterface(ole_obj, &IID_IPersistStorage, (void**)&persist); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_InitNew(persist, stg); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IStorage_OpenStream(stg, olestream, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, 0, &stm); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IStream_Read(stm, &header, sizeof(header), &read); - ok(hr == S_OK, "got %08x\n", hr); - ok(read == sizeof(header), "read %d\n", read); - ok(header.version == 0x02000001, "got version %08x\n", header.version); - ok(header.flags == 0x0, "got flags %08x\n", header.flags); - ok(header.link_update_opt == 0x0, "got link update option %08x\n", header.link_update_opt); - ok(header.res == 0x0, "got reserved %08x\n", header.res); - ok(header.moniker_size == 0x0, "got moniker size %08x\n", header.moniker_size); + ok(hr == S_OK, "got %08lx\n", hr); + ok(read == sizeof(header), "read %ld\n", read); + ok(header.version == 0x02000001, "got version %08lx\n", header.version); + ok(header.flags == 0x0, "got flags %08lx\n", header.flags); + ok(header.link_update_opt == 0x0, "got link update option %08lx\n", header.link_update_opt); + ok(header.res == 0x0, "got reserved %08lx\n", header.res); + ok(header.moniker_size == 0x0, "got moniker size %08lx\n", header.moniker_size);
IStream_Release(stm);
@@ -247,17 +247,17 @@ static void test_default_handler_run(void)
hres = CoRegisterClassObject(&test_server_clsid, (IUnknown*)&ClassFactory, CLSCTX_INPROC_SERVER, 0, &class_reg); - ok(hres == S_OK, "CoRegisterClassObject failed: %x\n", hres); + ok(hres == S_OK, "CoRegisterClassObject failed: %lx\n", hres);
hres = OleCreateDefaultHandler(&test_server_clsid, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "OleCreateDefaultHandler failed: %x\n", hres); + ok(hres == S_OK, "OleCreateDefaultHandler failed: %lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&ro); - ok(hres == S_OK, "QueryInterface(IRunnableObject) failed: %x\n", hres); + ok(hres == S_OK, "QueryInterface(IRunnableObject) failed: %lx\n", hres); IUnknown_Release(unk);
hres = IRunnableObject_Run(ro, NULL); - ok(hres == REGDB_E_CLASSNOTREG, "Run returned: %x, expected REGDB_E_CLASSNOTREG\n", hres); + ok(hres == REGDB_E_CLASSNOTREG, "Run returned: %lx, expected REGDB_E_CLASSNOTREG\n", hres); IRunnableObject_Release(ro);
SET_EXPECT(CF_QueryInterface_IMarshal); @@ -266,28 +266,28 @@ static void test_default_handler_run(void)
hres = CoRegisterClassObject(&test_server_clsid, (IUnknown*)&ClassFactory, CLSCTX_LOCAL_SERVER, 0, &class_reg); - ok(hres == S_OK, "CoRegisterClassObject failed: %x\n", hres); + ok(hres == S_OK, "CoRegisterClassObject failed: %lx\n", hres);
hres = OleCreateDefaultHandler(&test_server_clsid, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "OleCreateDefaultHandler failed: %x\n", hres); + ok(hres == S_OK, "OleCreateDefaultHandler failed: %lx\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IOleObject, (void**)&oleobj); - ok(hres == S_OK, "QueryInterface(IID_IOleObject) failed: %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IOleObject) failed: %lx\n", hres);
hres = IOleObject_QueryInterface(oleobj, &IID_IPersistStorage, (void**)&persist); - ok(hres == S_OK, "QueryInterface(IID_IPersistStorage) failed: %x\n", hres); + ok(hres == S_OK, "QueryInterface(IID_IPersistStorage) failed: %lx\n", hres); IPersistStorage_Release(persist); IOleObject_Release(oleobj);
hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&ro); - ok(hres == S_OK, "QueryInterface(IRunnableObject) failed: %x\n", hres); + ok(hres == S_OK, "QueryInterface(IRunnableObject) failed: %lx\n", hres); IUnknown_Release(unk);
SET_EXPECT(CF_QueryInterface_ClassFactory); SET_EXPECT(CF_CreateInstance); hres = IRunnableObject_Run(ro, NULL); todo_wine - ok(hres == S_OK, "Run failed: %x\n", hres); + ok(hres == S_OK, "Run failed: %lx\n", hres); CHECK_CALLED(CF_QueryInterface_ClassFactory); CHECK_CALLED(CF_CreateInstance); IRunnableObject_Release(ro); @@ -297,7 +297,7 @@ static void test_default_handler_run(void) hres = CoCreateInstance(&test_server_clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_IOleObject, (void**)&oleobj); todo_wine - ok(hres == REGDB_E_CLASSNOTREG, "expected REGDB_E_CLASSNOTREG, got %x\n", hres); + ok(hres == REGDB_E_CLASSNOTREG, "expected REGDB_E_CLASSNOTREG, got %lx\n", hres); todo_wine CHECK_NOT_CALLED(CF_QueryInterface_ClassFactory); todo_wine diff --git a/dlls/ole32/tests/dragdrop.c b/dlls/ole32/tests/dragdrop.c index 62ac15d8fc7..cc24efdcbd2 100644 --- a/dlls/ole32/tests/dragdrop.c +++ b/dlls/ole32/tests/dragdrop.c @@ -89,7 +89,7 @@ static HRESULT check_expect_(enum method func, DWORD expect_param, DWORD *set_pa if (call_ptr->method == func) break; } while ((++call_ptr)->method != end_seq);
- ok_( file, line )( expect_param == call_ptr->expect_param, "%s: unexpected param %08x expected %08x\n", + ok_( file, line )( expect_param == call_ptr->expect_param, "%s: unexpected param %08lx expected %08lx\n", method_names[func], expect_param, call_ptr->expect_param ); if (set_param) *set_param = call_ptr->set_param; hr = call_ptr->set_ret; @@ -263,7 +263,7 @@ static int droptarget_refs; static int test_reentrance;
/* helper macros to make tests a bit leaner */ -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
static HRESULT WINAPI DropTarget_QueryInterface(IDropTarget* iface, REFIID riid, void** ppvObject) @@ -430,7 +430,7 @@ static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface, static FORMATETC format = { CF_TEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; HRESULT hr = check_expect(EnumFMT_Next, 0, NULL);
- ok(celt == 1, "celt = %d\n", celt); + ok(celt == 1, "celt = %ld\n", celt); ok(rgelt != NULL, "rgelt == NULL\n"); ok(pceltFetched == NULL, "pceltFetched != NULL\n");
@@ -624,18 +624,18 @@ static void test_Register_Revoke(void) hr = RegisterDragDrop(hwnd, &DropTarget); ok(hr == E_OUTOFMEMORY || broken(hr == CO_E_NOTINITIALIZED), /* NT4 */ - "RegisterDragDrop without OLE initialized should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr); + "RegisterDragDrop without OLE initialized should have returned E_OUTOFMEMORY instead of 0x%08lx\n", hr);
OleInitialize(NULL);
hr = RegisterDragDrop(hwnd, NULL); - ok(hr == E_INVALIDARG, "RegisterDragDrop with NULL IDropTarget * should return E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "RegisterDragDrop with NULL IDropTarget * should return E_INVALIDARG instead of 0x%08lx\n", hr);
hr = RegisterDragDrop(NULL, &DropTarget); - ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr); + ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08lx\n", hr);
hr = RegisterDragDrop((HWND)0xdeadbeef, &DropTarget); - ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with garbage hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr); + ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with garbage hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08lx\n", hr);
ok(droptarget_refs == 0, "DropTarget refs should be zero not %d\n", droptarget_refs); hr = RegisterDragDrop(hwnd, &DropTarget); @@ -646,7 +646,7 @@ static void test_Register_Revoke(void) ok(prop == &DropTarget, "expected IDropTarget pointer %p, got %p\n", &DropTarget, prop);
hr = RegisterDragDrop(hwnd, &DropTarget); - ok(hr == DRAGDROP_E_ALREADYREGISTERED, "RegisterDragDrop with already registered hwnd should return DRAGDROP_E_ALREADYREGISTERED instead of 0x%08x\n", hr); + ok(hr == DRAGDROP_E_ALREADYREGISTERED, "RegisterDragDrop with already registered hwnd should return DRAGDROP_E_ALREADYREGISTERED instead of 0x%08lx\n", hr);
ok(droptarget_refs >= 1, "DropTarget refs should be at least one\n"); OleUninitialize(); @@ -662,7 +662,7 @@ static void test_Register_Revoke(void) }
hr = RevokeDragDrop(NULL); - ok(hr == DRAGDROP_E_INVALIDHWND, "RevokeDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr); + ok(hr == DRAGDROP_E_INVALIDHWND, "RevokeDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08lx\n", hr);
DestroyWindow(hwnd);
@@ -674,12 +674,12 @@ static void test_Register_Revoke(void) NULL, NULL, NULL);
hr = RegisterDragDrop(hwnd, &DropTarget); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
DestroyWindow(hwnd);
hr = RevokeDragDrop(hwnd); - ok(hr == DRAGDROP_E_INVALIDHWND, "got 0x%08x\n", hr); + ok(hr == DRAGDROP_E_INVALIDHWND, "got 0x%08lx\n", hr);
OleUninitialize(); } @@ -698,32 +698,32 @@ static void test_DoDragDrop(void) ok(IsWindow(hwnd), "failed to create window\n");
hr = OleInitialize(NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = RegisterDragDrop(hwnd, &DropTarget); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* incomplete arguments set */ hr = DoDragDrop(NULL, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(NULL, &DropSource, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(&DataObject, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(NULL, NULL, 0, &effect); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(&DataObject, &DropSource, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(NULL, &DropSource, 0, &effect); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = DoDragDrop(&DataObject, NULL, 0, &effect); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
ShowWindow(hwnd, SW_SHOW); GetWindowRect(hwnd, &rect); diff --git a/dlls/ole32/tests/errorinfo.c b/dlls/ole32/tests/errorinfo.c index bb350aea73d..f0e7cf02648 100644 --- a/dlls/ole32/tests/errorinfo.c +++ b/dlls/ole32/tests/errorinfo.c @@ -29,7 +29,7 @@
#include "wine/test.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
static const CLSID CLSID_WineTest = { /* 9474ba1a-258b-490b-bc13-516e9239ace0 */ @@ -101,17 +101,17 @@ static void test_error_info(void) IErrorInfo_Release(pErrorInfo);
hr = GetErrorInfo(0, &pErrorInfo); - ok(hr == S_FALSE, "GetErrorInfo should have returned S_FALSE instead of 0x%08x\n", hr); + ok(hr == S_FALSE, "GetErrorInfo should have returned S_FALSE instead of 0x%08lx\n", hr); ok(!pErrorInfo, "pErrorInfo should be set to NULL\n");
hr = SetErrorInfo(0, NULL); ok_ole_success(hr, "SetErrorInfo");
hr = GetErrorInfo(0xdeadbeef, &pErrorInfo); - ok(hr == E_INVALIDARG, "GetErrorInfo should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "GetErrorInfo should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = SetErrorInfo(0xdeadbeef, NULL); - ok(hr == E_INVALIDARG, "SetErrorInfo should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "SetErrorInfo should have returned E_INVALIDARG instead of 0x%08lx\n", hr); }
START_TEST(errorinfo) diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c index 5bcf9abfbda..237bcca9251 100644 --- a/dlls/ole32/tests/hglobalstream.c +++ b/dlls/ole32/tests/hglobalstream.c @@ -29,7 +29,7 @@
#include "wine/test.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
static char const * const *expected_method_list;
@@ -56,7 +56,7 @@ static void test_streamonhglobal(void) HRESULT hr;
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
ull.QuadPart = sizeof(data); hr = IStream_SetSize(pStream, ull); @@ -72,7 +72,7 @@ static void test_streamonhglobal(void) /* should return S_OK, not S_FALSE */ hr = IStream_Read(pStream, buffer, sizeof(buffer), &read); ok_ole_success(hr, "IStream_Read"); - ok(read == sizeof(data), "IStream_Read returned read %d\n", read); + ok(read == sizeof(data), "IStream_Read returned read %ld\n", read);
/* ignores HighPart */ ull.u.HighPart = -1; @@ -93,8 +93,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 0; hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == sizeof(data), "LowPart set to %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- invalid seek argument */ ull.u.HighPart = 0xCAFECAFE; @@ -102,9 +102,9 @@ static void test_streamonhglobal(void) ll.u.HighPart = 0; ll.u.LowPart = 123; hr = IStream_Seek(pStream, ll, STREAM_SEEK_END+1, &ull); - ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08x\n", hr); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should not have changed HighPart, got %d\n", ull.u.HighPart); + ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08lx\n", hr); + ok(ull.u.LowPart == sizeof(data), "LowPart set to %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should not have changed HighPart, got %ld\n", ull.u.HighPart);
/* IStream_Seek -- valid position argument (seek to beginning) */ ull.u.HighPart = 0xCAFECAFE; @@ -113,8 +113,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 0; hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- valid position argument (seek to end) */ ull.u.HighPart = 0xCAFECAFE; @@ -123,8 +123,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 0; hr = IStream_Seek(pStream, ll, STREAM_SEEK_END, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- ignore HighPart in the move value (seek from current position) */ ll.u.HighPart = 0; @@ -138,8 +138,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 0; hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == sizeof(data), "LowPart set to %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- ignore HighPart in the move value (seek to beginning) */ ll.u.HighPart = 0; @@ -153,8 +153,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 0; hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- invalid LowPart value (seek before start of stream) */ ll.u.HighPart = 0; @@ -167,9 +167,9 @@ static void test_streamonhglobal(void) ll.u.HighPart = 0; ll.u.LowPart = 0x80000000; hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08x\n", hr); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08lx\n", hr); + ok(ull.u.LowPart == sizeof(data), "LowPart set to %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- valid LowPart value (seek to start of stream) */ ll.u.HighPart = 0; @@ -183,8 +183,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = -(DWORD)sizeof(data); hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0, "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0, "LowPart set to %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- invalid LowPart value (seek to start of stream-1) */ ll.u.HighPart = 0; @@ -197,9 +197,9 @@ static void test_streamonhglobal(void) ll.u.HighPart = 0; ll.u.LowPart = -(DWORD)sizeof(data)-1; hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08x\n", hr); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08lx\n", hr); + ok(ull.u.LowPart == sizeof(data), "LowPart set to %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- valid LowPart value (seek forward to 0x80000000) */ ll.u.HighPart = 0; @@ -213,8 +213,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 0x80000000 - sizeof(data); hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x80000000, "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0x80000000, "LowPart set to %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- invalid LowPart value (seek to beginning) */ ll.u.HighPart = 0; @@ -227,9 +227,9 @@ static void test_streamonhglobal(void) ll.u.HighPart = 0; ll.u.LowPart = 0x80000000; hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08x\n", hr); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08lx\n", hr); + ok(ull.u.LowPart == sizeof(data), "LowPart set to %ld\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- valid LowPart value (seek to beginning) */ ull.u.HighPart = 0xCAFECAFE; @@ -238,8 +238,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 0x7FFFFFFF; hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x7FFFFFFF, "should have set LowPart to 0x7FFFFFFF instead of %08x\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0x7FFFFFFF, "should have set LowPart to 0x7FFFFFFF instead of %08lx\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- valid LowPart value (seek from current position) */ ll.u.HighPart = 0; @@ -253,8 +253,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 0x7FFFFFFF; hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x7FFFFFFF, "should have set LowPart to 0x7FFFFFFF instead of %08x\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0x7FFFFFFF, "should have set LowPart to 0x7FFFFFFF instead of %08lx\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- second seek allows you to go past 0x7FFFFFFF size */ ull.u.HighPart = 0xCAFECAFE; @@ -263,8 +263,8 @@ static void test_streamonhglobal(void) ll.u.LowPart = 9; hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x80000008, "should have set LowPart to 0x80000008 instead of %08x\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0x80000008, "should have set LowPart to 0x80000008 instead of %08lx\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
/* IStream_Seek -- seek wraps position/size on integer overflow, but not on win8 */ ull.u.HighPart = 0xCAFECAFE; @@ -274,10 +274,10 @@ static void test_streamonhglobal(void) hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); ok(hr == S_OK || hr == STG_E_SEEKERROR /* win8 */, "IStream_Seek\n"); if (SUCCEEDED(hr)) - ok(ull.u.LowPart == 0x00000007, "should have set LowPart to 0x00000007 instead of %08x\n", ull.u.LowPart); + ok(ull.u.LowPart == 0x00000007, "should have set LowPart to 0x00000007 instead of %08lx\n", ull.u.LowPart); else - ok(ull.u.LowPart == 0x80000008, "should have set LowPart to 0x80000008 instead of %08x\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); + ok(ull.u.LowPart == 0x80000008, "should have set LowPart to 0x80000008 instead of %08lx\n", ull.u.LowPart); + ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %ld\n", ull.u.HighPart);
hr = IStream_Commit(pStream, STGC_DEFAULT); ok_ole_success(hr, "IStream_Commit"); @@ -286,18 +286,18 @@ static void test_streamonhglobal(void) ok_ole_success(hr, "IStream_Revert");
hr = IStream_LockRegion(pStream, ull, ull, LOCK_WRITE); - ok(hr == STG_E_INVALIDFUNCTION, "IStream_LockRegion should have returned STG_E_INVALIDFUNCTION instead of 0x%08x\n", hr); + ok(hr == STG_E_INVALIDFUNCTION, "IStream_LockRegion should have returned STG_E_INVALIDFUNCTION instead of 0x%08lx\n", hr);
hr = IStream_Stat(pStream, &statstg, STATFLAG_DEFAULT); ok_ole_success(hr, "IStream_Stat"); - ok(statstg.type == STGTY_STREAM, "statstg.type should have been STGTY_STREAM instead of %d\n", statstg.type); + ok(statstg.type == STGTY_STREAM, "statstg.type should have been STGTY_STREAM instead of %ld\n", statstg.type);
/* test OOM condition */ ull.u.HighPart = -1; ull.u.LowPart = -1; hr = IStream_SetSize(pStream, ull); ok(hr == E_OUTOFMEMORY || broken(hr == S_OK), /* win9x */ - "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr); + "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08lx\n", hr);
IStream_Release(pStream); } @@ -437,15 +437,15 @@ static void test_copyto(void)
hr = IStream_Write(pStream, szHello, sizeof(szHello), &written); ok_ole_success(hr, "IStream_Write"); - ok(written == sizeof(szHello), "only %d bytes written\n", written); + ok(written == sizeof(szHello), "only %ld bytes written\n", written);
hr = IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); ok_ole_success(hr, "IStream_Seek");
cb.QuadPart = sizeof(szHello); hr = IStream_CopyTo(pStream, &Test_Stream, cb, &ullRead, &ullWritten); - ok(ullWritten.QuadPart == 5, "ullWritten was %d instead\n", (ULONG)ullWritten.QuadPart); - ok(ullRead.QuadPart == sizeof(szHello), "only %d bytes read\n", (ULONG)ullRead.QuadPart); + ok(ullWritten.QuadPart == 5, "ullWritten was %ld instead\n", (ULONG)ullWritten.QuadPart); + ok(ullRead.QuadPart == sizeof(szHello), "only %ld bytes read\n", (ULONG)ullRead.QuadPart); ok_ole_success(hr, "IStream_CopyTo");
ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); @@ -480,7 +480,7 @@ static void test_freed_hglobal(void) ULONG read, written;
hglobal = GlobalAlloc(GMEM_DDESHARE|GMEM_NODISCARD|GMEM_MOVEABLE, strlen(teststring) + 1); - ok(hglobal != NULL, "GlobalAlloc failed with error %d\n", GetLastError()); + ok(hglobal != NULL, "GlobalAlloc failed with error %ld\n", GetLastError()); p = GlobalLock(hglobal); strcpy(p, teststring); GlobalUnlock(hglobal); @@ -493,7 +493,7 @@ static void test_freed_hglobal(void) ok(!strcmp(buffer, teststring), "buffer data %s differs\n", buffer); ok(read == sizeof(teststring) || broken(read == ((sizeof(teststring) + 3) & ~3)), /* win9x rounds the size */ - "read should be sizeof(teststring) instead of %d\n", read); + "read should be sizeof(teststring) instead of %ld\n", read);
GlobalFree(hglobal);
@@ -502,15 +502,15 @@ static void test_freed_hglobal(void) hr = IStream_Read(pStream, buffer, sizeof(buffer), &read); ok_ole_success(hr, "IStream_Read"); ok(buffer[0] == 0, "buffer data should be untouched\n"); - ok(read == 0, "read should be 0 instead of %d\n", read); + ok(read == 0, "read should be 0 instead of %ld\n", read);
ull.QuadPart = sizeof(buffer); hr = IStream_SetSize(pStream, ull); - ok(hr == E_OUTOFMEMORY, "IStream_SetSize with invalid HGLOBAL should return E_OUTOFMEMORY instead of 0x%08x\n", hr); + ok(hr == E_OUTOFMEMORY, "IStream_SetSize with invalid HGLOBAL should return E_OUTOFMEMORY instead of 0x%08lx\n", hr);
hr = IStream_Write(pStream, buffer, sizeof(buffer), &written); - ok(hr == E_OUTOFMEMORY, "IStream_Write with invalid HGLOBAL should return E_OUTOFMEMORY instead of 0x%08x\n", hr); - ok(written == 0, "written should be 0 instead of %d\n", written); + ok(hr == E_OUTOFMEMORY, "IStream_Write with invalid HGLOBAL should return E_OUTOFMEMORY instead of 0x%08lx\n", hr); + ok(written == 0, "written should be 0 instead of %ld\n", written);
IStream_Release(pStream); } @@ -526,21 +526,21 @@ static void stream_info(IStream *stream, HGLOBAL *hmem, int *size, int *pos) *size = *pos = -1;
hr = GetHGlobalFromStream(stream, hmem); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
memset(&stat, 0x55, sizeof(stat)); hr = IStream_Stat(stream, &stat, STATFLAG_DEFAULT); - ok(hr == S_OK, "unexpected %#x\n", hr); - ok(stat.type == STGTY_STREAM, "unexpected %#x\n", stat.type); + ok(hr == S_OK, "unexpected %#lx\n", hr); + ok(stat.type == STGTY_STREAM, "unexpected %#lx\n", stat.type); ok(!stat.pwcsName, "unexpected %p\n", stat.pwcsName); ok(IsEqualIID(&stat.clsid, &GUID_NULL), "unexpected %s\n", wine_dbgstr_guid(&stat.clsid)); - ok(!stat.cbSize.HighPart, "unexpected %#x\n", stat.cbSize.HighPart); + ok(!stat.cbSize.HighPart, "unexpected %#lx\n", stat.cbSize.HighPart); *size = stat.cbSize.LowPart;
offset.QuadPart = 0; hr = IStream_Seek(stream, offset, STREAM_SEEK_CUR, &newpos); - ok(hr == S_OK, "unexpected %#x\n", hr); - ok(!newpos.HighPart, "unexpected %#x\n", newpos.HighPart); + ok(hr == S_OK, "unexpected %#lx\n", hr); + ok(!newpos.HighPart, "unexpected %#lx\n", newpos.HighPart); *pos = newpos.LowPart; }
@@ -559,13 +559,13 @@ static void test_IStream_Clone(void) orig_hmem = GlobalAlloc(GMEM_MOVEABLE, 0); ok(orig_hmem != 0, "unexpected %p\n", orig_hmem); hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &stream); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = GetHGlobalFromStream(stream, NULL); - ok(hr == E_INVALIDARG, "unexpected %#x\n", hr); + ok(hr == E_INVALIDARG, "unexpected %#lx\n", hr);
hr = GetHGlobalFromStream(NULL, &hmem); - ok(hr == E_INVALIDARG, "unexpected %#x\n", hr); + ok(hr == E_INVALIDARG, "unexpected %#lx\n", hr);
stream_info(stream, &hmem, &size, &pos); ok(hmem == orig_hmem, "handles should match\n"); @@ -573,10 +573,10 @@ static void test_IStream_Clone(void) ok(pos == 0, "unexpected %d\n", pos);
hr = IStream_Clone(stream, &clone); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IStream_Write(stream, hello, sizeof(hello), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
stream_info(stream, &hmem, &size, &pos); ok(hmem == orig_hmem, "handles should match\n"); @@ -590,12 +590,12 @@ static void test_IStream_Clone(void)
buf[0] = 0; hr = IStream_Read(clone, buf, sizeof(buf), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); ok(!strcmp(buf, hello), "wrong stream contents\n");
newsize.QuadPart = 0x8000; hr = IStream_SetSize(stream, newsize); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
stream_info(stream, &hmem, &size, &pos); ok(hmem == orig_hmem, "handles should match\n"); @@ -614,10 +614,10 @@ static void test_IStream_Clone(void) orig_hmem = GlobalAlloc(GMEM_FIXED, 1); ok(orig_hmem != 0, "unexpected %p\n", orig_hmem); hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &stream); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IStream_Clone(stream, &clone); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
stream_info(stream, &hmem, &size, &pos); ok(hmem == orig_hmem, "handles should match\n"); @@ -631,7 +631,7 @@ static void test_IStream_Clone(void)
newsize.QuadPart = 0x8000; hr = IStream_SetSize(stream, newsize); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
stream_info(stream, &hmem, &size, &pos); ok(hmem != 0, "unexpected %p\n", hmem); @@ -649,10 +649,10 @@ static void test_IStream_Clone(void)
/* test Release of cloned stream */ hr = CreateStreamOnHGlobal(0, TRUE, &stream); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IStream_Clone(stream, &clone); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
stream_info(stream, &hmem, &size, &pos); ok(hmem != 0, "unexpected %p\n", hmem); @@ -669,7 +669,7 @@ static void test_IStream_Clone(void)
newsize.QuadPart = 0x8000; hr = IStream_SetSize(clone, newsize); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
stream_info(clone, &hmem_clone, &size, &pos); ok(hmem_clone == hmem, "handles should match\n"); @@ -677,7 +677,7 @@ static void test_IStream_Clone(void) ok(pos == 0, "unexpected %d\n", pos);
hr = IStream_Write(clone, hello, sizeof(hello), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
stream_info(clone, &hmem_clone, &size, &pos); ok(hmem_clone == hmem, "handles should match\n"); @@ -686,11 +686,11 @@ static void test_IStream_Clone(void)
offset.QuadPart = 0; hr = IStream_Seek(clone, offset, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
buf[0] = 0; hr = IStream_Read(clone, buf, sizeof(buf), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); ok(!strcmp(buf, hello), "wrong stream contents\n");
stream_info(clone, &hmem_clone, &size, &pos); diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index a1cd3dccb15..6e21ed1889b 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -67,11 +67,11 @@ static const GUID CLSID_ft_unmarshaler_1809 = {0x00000359, 0x0000, 0x0000, {0xc0 static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID,REFIID,LPVOID);
/* helper macros to make tests a bit leaner */ -#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks) -#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks) -#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) +#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %ld\n", cLocks) +#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %ld\n", cLocks) +#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr) #define ok_non_zero_external_conn() do {if (with_external_conn) ok(external_connections, "got no external connections\n");} while(0); -#define ok_zero_external_conn() do {if (with_external_conn) ok(!external_connections, "got %d external connections\n", external_connections);} while(0); +#define ok_zero_external_conn() do {if (with_external_conn) ok(!external_connections, "got %ld external connections\n", external_connections);} while(0); #define ok_last_release_closes(b) do {if (with_external_conn) ok(last_release_closes == b, "got %d expected %d\n", last_release_closes, b);} while(0);
#define OBJREF_SIGNATURE (0x574f454d) @@ -490,8 +490,8 @@ static HRESULT WINAPI RpcStubBuffer_Invoke(IRpcStubBuffer *iface, RPCOLEMESSAGE CHECK_EXPECT(Invoke);
hr = IRpcChannelBuffer_GetDestCtx(_pRpcChannelBuffer, &dest_context, &dest_context_data); - ok(hr == S_OK, "GetDestCtx failed: %08x\n", hr); - ok(dest_context == MSHCTX_INPROC, "desc_context = %x\n", dest_context); + ok(hr == S_OK, "GetDestCtx failed: %08lx\n", hr); + ok(dest_context == MSHCTX_INPROC, "desc_context = %lx\n", dest_context); ok(!dest_context_data, "desc_context_data = %p\n", dest_context_data);
return IRpcStubBuffer_Invoke(This->buffer, _prpcmsg, _pRpcChannelBuffer); @@ -580,7 +580,7 @@ static HRESULT WINAPI PSFactoryBuffer_CreateStub(IPSFactoryBuffer *iface, REFIID stub->ref = 1;
hr = IPSFactoryBuffer_CreateStub(ps_factory_buffer, riid, server, &stub->buffer); - ok(hr == S_OK, "CreateStub failed: %08x\n", hr); + ok(hr == S_OK, "CreateStub failed: %08lx\n", hr);
*ppStub = &stub->IRpcStubBuffer_iface; return S_OK; @@ -625,7 +625,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p) if(data->register_object) { hr = CoRegisterClassObject(data->register_clsid, data->register_object, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®istration_key); - ok(hr == S_OK, "CoRegisterClassObject failed: %08x\n", hr); + ok(hr == S_OK, "CoRegisterClassObject failed: %08lx\n", hr); }
if (data->filter) @@ -698,7 +698,7 @@ static void release_host_object(DWORD tid, WPARAM wp) static void end_host_object(DWORD tid, HANDLE thread) { BOOL ret = PostThreadMessageA(tid, WM_QUIT, 0, 0); - ok(ret, "PostThreadMessage failed with error %d\n", GetLastError()); + ok(ret, "PostThreadMessage failed with error %ld\n", GetLastError()); /* be careful of races - don't return until hosting thread has terminated */ ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); CloseHandle(thread); @@ -714,7 +714,7 @@ static void test_no_marshaler(void) hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); ok_ole_success(hr, CreateStreamOnHGlobal); hr = CoMarshalInterface(pStream, &IID_IWineTest, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_NOINTERFACE, "CoMarshalInterface should have returned E_NOINTERFACE instead of 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "CoMarshalInterface should have returned E_NOINTERFACE instead of 0x%08lx\n", hr);
IStream_Release(pStream); } @@ -815,7 +815,7 @@ static void test_marshal_and_unmarshal_invalid(void) if (pProxy) { hr = IClassFactory_CreateInstance(pProxy, NULL, &IID_IUnknown, &dummy); - ok(hr == RPC_E_DISCONNECTED, "Remote call should have returned RPC_E_DISCONNECTED, instead of 0x%08x\n", hr); + ok(hr == RPC_E_DISCONNECTED, "Remote call should have returned RPC_E_DISCONNECTED, instead of 0x%08lx\n", hr);
IClassFactory_Release(pProxy); } @@ -848,7 +848,7 @@ static void test_same_apartment_unmarshal_failure(void) ok_ole_success(hr, IStream_Seek);
hr = CoUnmarshalInterface(pStream, &IID_IParseDisplayName, (void **)&pProxy); - ok(hr == E_NOINTERFACE, "CoUnmarshalInterface should have returned E_NOINTERFACE instead of 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "CoUnmarshalInterface should have returned E_NOINTERFACE instead of 0x%08lx\n", hr);
ok_no_locks(); ok_zero_external_conn(); @@ -1078,7 +1078,7 @@ static void test_proxy_marshal_and_unmarshal_weak(void) IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); todo_wine - ok(hr == CO_E_OBJNOTREG, "CoUnmarshalInterface should return CO_E_OBJNOTREG instead of 0x%08x\n", hr); + ok(hr == CO_E_OBJNOTREG, "CoUnmarshalInterface should return CO_E_OBJNOTREG instead of 0x%08lx\n", hr);
ok_no_locks(); ok_zero_external_conn(); @@ -1119,7 +1119,7 @@ static void test_proxy_marshal_and_unmarshal_strong(void) IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); /* marshal the proxy */ hr = CoMarshalInterface(pStream, &IID_IClassFactory, pProxy, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLESTRONG); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok_more_than_one_lock(); ok_non_zero_external_conn(); @@ -1227,10 +1227,10 @@ static void test_marshal_proxy_apartment_shutdown(void) ok_last_release_closes(TRUE);
hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&unk); - ok(hr == CO_E_OBJNOTCONNECTED, "got %#x\n", hr); + ok(hr == CO_E_OBJNOTCONNECTED, "got %#lx\n", hr);
ref = IClassFactory_Release(proxy); - ok(!ref, "got %d refs\n", ref); + ok(!ref, "got %ld refs\n", ref);
ok_no_locks();
@@ -1320,22 +1320,22 @@ static void test_marshal_channel_buffer(void)
hr = CoRegisterClassObject(&CLSID_WineTestPSFactoryBuffer, (IUnknown *)&PSFactoryBuffer, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®istration_key); - ok(hr == S_OK, "CoRegisterClassObject failed: %08x\n", hr); + ok(hr == S_OK, "CoRegisterClassObject failed: %08lx\n", hr);
hr = CoRegisterPSClsid(&IID_IOleWindow, &CLSID_WineTestPSFactoryBuffer); - ok(hr == S_OK, "CoRegisterPSClsid failed: %08x\n", hr); + ok(hr == S_OK, "CoRegisterPSClsid failed: %08lx\n", hr);
SET_EXPECT(CreateStub); SET_EXPECT(CreateProxy); hr = IUnknown_QueryInterface(proxy, &IID_IOleWindow, (void**)&ole_window); - ok(hr == S_OK, "Could not get IOleWindow iface: %08x\n", hr); + ok(hr == S_OK, "Could not get IOleWindow iface: %08lx\n", hr); CHECK_CALLED(CreateStub); CHECK_CALLED(CreateProxy);
SET_EXPECT(Invoke); SET_EXPECT(GetWindow); hr = IOleWindow_GetWindow(ole_window, &hwnd); - ok(hr == S_OK, "GetWindow failed: %08x\n", hr); + ok(hr == S_OK, "GetWindow failed: %08lx\n", hr); ok((DWORD)(DWORD_PTR)hwnd == 0xdeadbeef, "hwnd = %p\n", hwnd); CHECK_CALLED(Invoke); CHECK_CALLED(GetWindow); @@ -1348,7 +1348,7 @@ static void test_marshal_channel_buffer(void) CHECK_CALLED(Disconnect);
hr = CoRevokeClassObject(registration_key); - ok(hr == S_OK, "CoRevokeClassObject failed: %08x\n", hr); + ok(hr == S_OK, "CoRevokeClassObject failed: %08lx\n", hr);
end_host_object(tid, thread); } @@ -1414,8 +1414,8 @@ static HRESULT WINAPI CustomMarshal_MarshalInterface(IMarshal *iface, IStream *s
hr = IStream_Stat(stream, &stat, STATFLAG_DEFAULT); ok_ole_success(hr, IStream_Stat); - ok(U(stat.cbSize).LowPart == 0, "stream is not empty (%d)\n", U(stat.cbSize).LowPart); - ok(U(stat.cbSize).HighPart == 0, "stream is not empty (%d)\n", U(stat.cbSize).HighPart); + ok(U(stat.cbSize).LowPart == 0, "stream is not empty (%ld)\n", U(stat.cbSize).LowPart); + ok(U(stat.cbSize).HighPart == 0, "stream is not empty (%ld)\n", U(stat.cbSize).HighPart);
hr = CoGetStandardMarshal(riid, (IUnknown*)iface, dwDestContext, NULL, mshlflags, &std_marshal); @@ -1511,7 +1511,7 @@ static void test_StdMarshal_custom_marshaling(void) MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); ok_ole_success(hr, CoGetMarshalSizeMax); CHECK_CALLED(CustomMarshal_GetMarshalSizeMax); - ok(size == sizeof(OBJREF), "size = %d, expected %d\n", size, (int)sizeof(OBJREF)); + ok(size == sizeof(OBJREF), "size = %ld, expected %d\n", size, (int)sizeof(OBJREF)); }
static void test_DfMarshal_custom_marshaling(void) @@ -1540,17 +1540,17 @@ static void test_DfMarshal_custom_marshaling(void) size = FIELD_OFFSET(OBJREF, u_objref.u_custom.pData); hr = IStream_Read(stream, &objref, size, &read); ok_ole_success(hr, IStream_Read); - ok(read == size, "read = %d, expected %d\n", read, size); - ok(objref.signature == OBJREF_SIGNATURE, "objref.signature = %x\n", + ok(read == size, "read = %ld, expected %ld\n", read, size); + ok(objref.signature == OBJREF_SIGNATURE, "objref.signature = %lx\n", objref.signature); - ok(objref.flags == OBJREF_CUSTOM, "objref.flags = %x\n", objref.flags); + ok(objref.flags == OBJREF_CUSTOM, "objref.flags = %lx\n", objref.flags); ok(IsEqualIID(&objref.iid, &IID_IUnknown), "objref.iid = %s\n", wine_dbgstr_guid(&objref.iid)); ok(IsEqualIID(&objref.u_objref.u_custom.clsid, &CLSID_DfMarshal), "custom.clsid = %s\n", wine_dbgstr_guid(&objref.u_objref.u_custom.clsid)); - ok(!objref.u_objref.u_custom.cbExtension, "custom.cbExtension = %d\n", + ok(!objref.u_objref.u_custom.cbExtension, "custom.cbExtension = %ld\n", objref.u_objref.u_custom.cbExtension); - ok(!objref.u_objref.u_custom.size, "custom.size = %d\n", + ok(!objref.u_objref.u_custom.size, "custom.size = %ld\n", objref.u_objref.u_custom.size);
IStream_Release(stream); @@ -1560,7 +1560,7 @@ static void test_DfMarshal_custom_marshaling(void) MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); ok_ole_success(hr, CoGetMarshalSizeMax); CHECK_CALLED(CustomMarshal_GetMarshalSizeMax); - ok(size == sizeof(OBJREF), "size = %d, expected %d\n", size, (int)sizeof(OBJREF)); + ok(size == sizeof(OBJREF), "size = %ld, expected %d\n", size, (int)sizeof(OBJREF)); }
static void test_CoGetStandardMarshal(void) @@ -1593,7 +1593,7 @@ static void test_CoGetStandardMarshal(void) hr = CoGetMarshalSizeMax(&read, &IID_IUnknown, &Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); ok_ole_success(hr, CoGetMarshalSizeMax); - ok(size == read, "IMarshal_GetMarshalSizeMax size = %d, expected %d\n", size, read); + ok(size == read, "IMarshal_GetMarshalSizeMax size = %ld, expected %ld\n", size, read);
hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUnknown, &Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); @@ -1604,15 +1604,15 @@ static void test_CoGetStandardMarshal(void) size = FIELD_OFFSET(OBJREF, u_objref.u_standard.saResAddr.aStringArray); hr = IStream_Read(stream, &objref, size, &read); ok_ole_success(hr, IStream_Read); - ok(read == size, "read = %d, expected %d\n", read, size); - ok(objref.signature == OBJREF_SIGNATURE, "objref.signature = %x\n", + ok(read == size, "read = %ld, expected %ld\n", read, size); + ok(objref.signature == OBJREF_SIGNATURE, "objref.signature = %lx\n", objref.signature); - ok(objref.flags == OBJREF_STANDARD, "objref.flags = %x\n", objref.flags); + ok(objref.flags == OBJREF_STANDARD, "objref.flags = %lx\n", objref.flags); ok(IsEqualIID(&objref.iid, &IID_IUnknown), "objref.iid = %s\n", wine_dbgstr_guid(&objref.iid)); stdobjref = &objref.u_objref.u_standard.std; - ok(stdobjref->flags == 0, "stdobjref.flags = %d\n", stdobjref->flags); - ok(stdobjref->cPublicRefs == 5, "stdobjref.cPublicRefs = %d\n", + ok(stdobjref->flags == 0, "stdobjref.flags = %ld\n", stdobjref->flags); + ok(stdobjref->cPublicRefs == 5, "stdobjref.cPublicRefs = %ld\n", stdobjref->cPublicRefs); dualstringarr = &objref.u_objref.u_standard.saResAddr; ok(dualstringarr->wNumEntries == 0, "dualstringarr.wNumEntries = %d\n", @@ -1978,7 +1978,7 @@ static void test_tableweak_marshal_releasedata2(void) todo_wine { ok(hr == CO_E_OBJNOTREG, - "CoUnmarshalInterface should have failed with CO_E_OBJNOTREG, but returned 0x%08x instead\n", + "CoUnmarshalInterface should have failed with CO_E_OBJNOTREG, but returned 0x%08lx instead\n", hr); } IStream_Release(pStream); @@ -2389,7 +2389,7 @@ static void test_disconnect_stub(void) ok_non_zero_external_conn();
hr = CoDisconnectObject(NULL, 0); - ok( hr == E_INVALIDARG, "wrong status %x\n", hr ); + ok( hr == E_INVALIDARG, "wrong status %lx\n", hr ); }
/* tests failure case of a same-thread marshal and unmarshal twice */ @@ -2422,7 +2422,7 @@ static void test_normal_marshal_and_unmarshal_twice(void) IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); ok(hr == CO_E_OBJNOTCONNECTED, - "CoUnmarshalInterface should have failed with error CO_E_OBJNOTCONNECTED for double unmarshal, instead of 0x%08x\n", hr); + "CoUnmarshalInterface should have failed with error CO_E_OBJNOTCONNECTED for double unmarshal, instead of 0x%08lx\n", hr);
IStream_Release(pStream);
@@ -2451,14 +2451,14 @@ static void test_hresult_marshaling(void) hr = IStream_Read(pStream, &hr_marshaled, sizeof(HRESULT), NULL); ok_ole_success(hr, IStream_Read);
- ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08x instead\n", hr_marshaled); + ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08lx instead\n", hr_marshaled);
hr_marshaled = 0; IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); hr = CoUnmarshalHresult(pStream, &hr_marshaled); ok_ole_success(hr, CoUnmarshalHresult);
- ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08x instead\n", hr_marshaled); + ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08lx instead\n", hr_marshaled);
IStream_Release(pStream); } @@ -2472,15 +2472,15 @@ static DWORD CALLBACK bad_thread_proc(LPVOID p) IUnknown * proxy = NULL;
hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); - todo_wine ok(hr == CO_E_NOTINITIALIZED, "Got hr %#x.\n", hr); + todo_wine ok(hr == CO_E_NOTINITIALIZED, "Got hr %#lx.\n", hr);
hr = IClassFactory_QueryInterface(cf, &IID_IMultiQI, (LPVOID *)&proxy); - todo_wine ok(hr == RPC_E_WRONG_THREAD, "Got hr %#x.\n", hr); + todo_wine ok(hr == RPC_E_WRONG_THREAD, "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) IUnknown_Release(proxy);
hr = IClassFactory_QueryInterface(cf, &IID_IStream, (LPVOID *)&proxy); - todo_wine ok(hr == RPC_E_WRONG_THREAD, "Got hr %#x.\n", hr); + todo_wine ok(hr == RPC_E_WRONG_THREAD, "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) IUnknown_Release(proxy);
@@ -2489,11 +2489,11 @@ static DWORD CALLBACK bad_thread_proc(LPVOID p) hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); if (proxy) IUnknown_Release(proxy); ok(hr == RPC_E_WRONG_THREAD, - "COM should have failed with RPC_E_WRONG_THREAD on using proxy from wrong apartment, but instead returned 0x%08x\n", + "COM should have failed with RPC_E_WRONG_THREAD on using proxy from wrong apartment, but instead returned 0x%08lx\n", hr);
hr = IClassFactory_QueryInterface(cf, &IID_IStream, (LPVOID *)&proxy); - todo_wine ok(hr == RPC_E_WRONG_THREAD, "Got hr %#x.\n", hr); + todo_wine ok(hr == RPC_E_WRONG_THREAD, "Got hr %#lx.\n", hr);
/* now be really bad and release the proxy from the wrong apartment */ IClassFactory_Release(cf); @@ -2653,7 +2653,7 @@ static void test_message_filter(void) ok_more_than_one_lock();
hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); - ok(hr == RPC_E_CALL_REJECTED, "Call should have returned RPC_E_CALL_REJECTED, but return 0x%08x instead\n", hr); + ok(hr == RPC_E_CALL_REJECTED, "Call should have returned RPC_E_CALL_REJECTED, but return 0x%08lx instead\n", hr); if (proxy) IUnknown_Release(proxy); proxy = NULL;
@@ -2690,7 +2690,7 @@ static void test_bad_marshal_stream(void)
/* try to read beyond end of stream */ hr = CoReleaseMarshalData(pStream); - ok(hr == STG_E_READFAULT, "Should have failed with STG_E_READFAULT, but returned 0x%08x instead\n", hr); + ok(hr == STG_E_READFAULT, "Should have failed with STG_E_READFAULT, but returned 0x%08lx instead\n", hr);
/* now release for real */ IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); @@ -2821,16 +2821,16 @@ static void test_proxybuffer(REFIID riid) /* release our reference to the outer unknown object - the PS factory * buffer will have AddRef's it in the CreateProxy call */ refs = IUnknown_Release(&pUnkOuter->IUnknown_iface); - ok(refs == 1, "Ref count of outer unknown should have been 1 instead of %d\n", refs); + ok(refs == 1, "Ref count of outer unknown should have been 1 instead of %ld\n", refs);
/* Not checking return, unreliable on native. Maybe it leaks references? */ IPSFactoryBuffer_Release(psfb);
refs = IUnknown_Release((IUnknown *)lpvtbl); - ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs); + ok(refs == 0, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs);
refs = IRpcProxyBuffer_Release(proxy); - ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs); + ok(refs == 0, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs); }
static void test_stubbuffer(REFIID riid) @@ -2862,7 +2862,7 @@ static void test_stubbuffer(REFIID riid) ok_no_locks();
refs = IRpcStubBuffer_Release(stub); - ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs); + ok(refs == 0, "Ref-count leak of %ld on IRpcProxyBuffer\n", refs); }
static HWND hwnd_app; @@ -2925,7 +2925,7 @@ static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l /* note the use of the magic IID_IWineTest value to tell remote thread * to try to send a message back to us */ hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IWineTest, (void **)&object); - ok(hr == S_FALSE, "expected S_FALSE, got %d\n", hr); + ok(hr == S_FALSE, "expected S_FALSE, got %ld\n", hr);
IClassFactory_Release(proxy);
@@ -2965,7 +2965,7 @@ static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l * WM_QUIT message doesn't stop the call from succeeding */ PostMessageA(hwnd, WM_QUIT, 0, 0); hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object); - ok(hr == S_FALSE, "IClassFactory_CreateInstance returned 0x%08x, expected S_FALSE\n", hr); + ok(hr == S_FALSE, "IClassFactory_CreateInstance returned 0x%08lx, expected S_FALSE\n", hr);
IClassFactory_Release(proxy);
@@ -2997,7 +2997,7 @@ static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l * messages should fail */ hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object); ok(hr == RPC_E_CANTCALLOUT_ININPUTSYNCCALL, - "COM call during processing of sent message should return RPC_E_CANTCALLOUT_ININPUTSYNCCALL instead of 0x%08x\n", hr); + "COM call during processing of sent message should return RPC_E_CANTCALLOUT_ININPUTSYNCCALL instead of 0x%08lx\n", hr);
IClassFactory_Release(proxy);
@@ -3153,15 +3153,15 @@ static void test_freethreadedmarshaldata(IStream *pStream, MSHCTX mshctx, void * if (mshctx == MSHCTX_INPROC) { DWORD expected_size = round_global_size(3*sizeof(DWORD) + sizeof(GUID)); - ok(size == expected_size, "expected size %u, got %u\n", expected_size, size); + ok(size == expected_size, "expected size %lu, got %lu\n", expected_size, size);
- ok(*(DWORD *)marshal_data == mshlflags, "expected 0x%x, but got 0x%x for mshctx\n", mshlflags, *(DWORD *)marshal_data); + ok(*(DWORD *)marshal_data == mshlflags, "expected 0x%lx, but got 0x%lx for mshctx\n", mshlflags, *(DWORD *)marshal_data); marshal_data += sizeof(DWORD); ok(*(void **)marshal_data == ptr, "expected %p, but got %p for mshctx\n", ptr, *(void **)marshal_data); marshal_data += sizeof(void *); if (sizeof(void*) == 4 && size >= 3*sizeof(DWORD)) { - ok(*(DWORD *)marshal_data == 0, "expected 0x0, but got 0x%x\n", *(DWORD *)marshal_data); + ok(*(DWORD *)marshal_data == 0, "expected 0x0, but got 0x%lx\n", *(DWORD *)marshal_data); marshal_data += sizeof(DWORD); } if (size >= 3*sizeof(DWORD) + sizeof(GUID) && winetest_debug > 1) @@ -3171,7 +3171,7 @@ static void test_freethreadedmarshaldata(IStream *pStream, MSHCTX mshctx, void * } else { - ok(size > sizeof(DWORD), "size should have been > sizeof(DWORD), not %d\n", size); + ok(size > sizeof(DWORD), "size should have been > sizeof(DWORD), not %ld\n", size); ok(*(DWORD *)marshal_data == 0x574f454d /* MEOW */, "marshal data should be filled by standard marshal and start with MEOW signature\n"); } @@ -3206,8 +3206,8 @@ static void test_freethreadedmarshaler(void) expected_size = sizeof(DWORD) /* flags */ + sizeof(UINT64) + sizeof(GUID); hr = IMarshal_GetMarshalSizeMax(pFTMarshal, &IID_IClassFactory, &Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL, &size); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(size == expected_size, "Unexpected marshal size %u, expected %u.\n", size, expected_size); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(size == expected_size, "Unexpected marshal size %lu, expected %lu.\n", size, expected_size);
hr = IMarshal_GetUnmarshalClass(pFTMarshal, &IID_IClassFactory, &Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL, &clsid); @@ -3357,10 +3357,10 @@ static HRESULT reg_unreg_wine_test_class(BOOL Register) skip("Not authorized to modify the Classes key\n"); return E_FAIL; } - ok(error == ERROR_SUCCESS, "RegCreateKeyEx failed with error %d\n", error); + ok(error == ERROR_SUCCESS, "RegCreateKeyEx failed with error %ld\n", error); if (error != ERROR_SUCCESS) hr = E_FAIL; error = RegSetValueExA(hkey, NULL, 0, REG_SZ, (const unsigned char *)""ole32.dll"", strlen(""ole32.dll"") + 1); - ok(error == ERROR_SUCCESS, "RegSetValueEx failed with error %d\n", error); + ok(error == ERROR_SUCCESS, "RegSetValueEx failed with error %ld\n", error); if (error != ERROR_SUCCESS) hr = E_FAIL; RegCloseKey(hkey); } @@ -3388,7 +3388,7 @@ static void test_inproc_handler(void) if (SUCCEEDED(hr)) { hr = IUnknown_QueryInterface(pObject, &IID_IWineTest, (void **)&pObject2); - ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface on handler for invalid interface returned 0x%08x instead of E_NOINTERFACE\n", hr); + ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface on handler for invalid interface returned 0x%08lx instead of E_NOINTERFACE\n", hr);
/* it's a handler as it supports IOleObject */ hr = IUnknown_QueryInterface(pObject, &IID_IOleObject, (void **)&pObject2); @@ -3481,7 +3481,7 @@ static void test_handler_marshaling(void) ok_more_than_one_lock();
hr = IUnknown_QueryInterface(pProxy, &IID_IWineTest, (void **)&pObject); - ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface with unknown IID should have returned E_NOINTERFACE instead of 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface with unknown IID should have returned E_NOINTERFACE instead of 0x%08lx\n", hr);
/* it's a handler as it supports IOleObject */ hr = IUnknown_QueryInterface(pProxy, &IID_IOleObject, (void **)&pObject); @@ -3541,7 +3541,7 @@ static void test_client_security(void) if (SUCCEEDED(IClassFactory_QueryInterface(pProxy, &IID_IRemUnknown, (void **)&pProxy2))) { hr = IUnknown_QueryInterface(pProxy2, &IID_IUnknown, (void **)&pUnknown2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(pUnknown1 == pUnknown2, "both proxy's IUnknowns should be the same - %p, %p\n", pUnknown1, pUnknown2); IUnknown_Release(pUnknown2); @@ -3559,7 +3559,7 @@ static void test_client_security(void) todo_wine ok_ole_success(hr, "IClientSecurity_QueryBlanket (all NULLs)");
hr = IClientSecurity_QueryBlanket(pCliSec, (IUnknown *)pMarshal, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - todo_wine ok(hr == E_NOINTERFACE, "IClientSecurity_QueryBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IClientSecurity_QueryBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08lx\n", hr);
hr = IClientSecurity_QueryBlanket(pCliSec, (IUnknown *)pProxy, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities); todo_wine ok_ole_success(hr, "IClientSecurity_QueryBlanket"); @@ -3568,13 +3568,13 @@ static void test_client_security(void) todo_wine ok_ole_success(hr, "IClientSecurity_SetBlanket");
hr = IClassFactory_CreateInstance(pProxy, NULL, &IID_IWineTest, &pv); - ok(hr == E_NOINTERFACE, "COM call should have succeeded instead of returning 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "COM call should have succeeded instead of returning 0x%08lx\n", hr);
hr = IClientSecurity_SetBlanket(pCliSec, (IUnknown *)pMarshal, dwAuthnSvc, dwAuthzSvc, pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities); - todo_wine ok(hr == E_NOINTERFACE, "IClientSecurity_SetBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08x\n", hr); + todo_wine ok(hr == E_NOINTERFACE, "IClientSecurity_SetBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08lx\n", hr);
hr = IClientSecurity_SetBlanket(pCliSec, (IUnknown *)pProxy, 0xdeadbeef, dwAuthzSvc, pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities); - todo_wine ok(hr == E_INVALIDARG, "IClientSecurity_SetBlanke with invalid dwAuthnSvc should have returned E_INVALIDARG instead of 0x%08x\n", hr); + todo_wine ok(hr == E_INVALIDARG, "IClientSecurity_SetBlanke with invalid dwAuthnSvc should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
CoTaskMemFree(pServerPrincName);
@@ -3647,12 +3647,12 @@ static HRESULT WINAPI local_server_GetClassID(IPersist *iface, CLSID *clsid)
/* Test calling CoDisconnectObject within a COM call */ hr = CoDisconnectObject((IUnknown *)iface, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* Initialize and uninitialize the apartment to show that we * remain in the autojoined mta */ hr = CoInitializeEx( NULL, COINIT_MULTITHREADED ); - ok( hr == S_FALSE, "got %08x\n", hr ); + ok( hr == S_FALSE, "got %08lx\n", hr ); CoUninitialize();
return S_OK; @@ -3798,7 +3798,7 @@ static HANDLE create_target_process(const char *arg) winetest_get_mainargs( &argv ); sprintf(cmdline, ""%s" %s %s", argv[0], argv[1], arg); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed with error: %u\n", GetLastError()); + ok(ret, "CreateProcess failed with error: %lu\n", GetLastError()); if (pi.hThread) CloseHandle(pi.hThread); return pi.hProcess; } @@ -3830,7 +3830,7 @@ static void test_local_server(void) * class in the registry */ hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (LPVOID*)&cf); - todo_wine ok(hr == REGDB_E_CLASSNOTREG, "Got hr %#x.\n", hr); + todo_wine ok(hr == REGDB_E_CLASSNOTREG, "Got hr %#lx.\n", hr);
/* Resume the object suspended above ... */ hr = CoResumeClassObjects(); @@ -3865,7 +3865,7 @@ static void test_local_server(void) /* try to connect again after SCM has suspended registered class objects */ hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, NULL, &IID_IClassFactory, (LPVOID*)&cf); - todo_wine ok(hr == CO_E_SERVER_STOPPING || hr == REGDB_E_CLASSNOTREG /* Win10 1709+ */, "Got hr %#x.\n", hr); + todo_wine ok(hr == CO_E_SERVER_STOPPING || hr == REGDB_E_CLASSNOTREG /* Win10 1709+ */, "Got hr %#lx.\n", hr);
hr = CoRevokeClassObject(cookie); ok_ole_success(hr, CoRevokeClassObject); @@ -3873,7 +3873,7 @@ static void test_local_server(void) CloseHandle(heventShutdown);
process = create_target_process("-Embedding"); - ok(process != NULL, "couldn't start local server process, error was %d\n", GetLastError()); + ok(process != NULL, "couldn't start local server process, error was %ld\n", GetLastError());
ready_event = CreateEventA(NULL, FALSE, FALSE, "Wine COM Test Ready Event"); ok( !WaitForSingleObject(ready_event, 10000), "wait timed out\n" ); @@ -3922,7 +3922,7 @@ static DWORD CALLBACK get_global_interface_proc(LPVOID pv) IClassFactory *cf;
hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(params->git, params->cookie, &IID_IClassFactory, (void **)&cf); - ok(hr == CO_E_NOTINITIALIZED, "Got hr %#x.\n", hr); + ok(hr == CO_E_NOTINITIALIZED, "Got hr %#lx.\n", hr);
CoInitialize(NULL);
@@ -3952,10 +3952,10 @@ static void test_globalinterfacetable(void) cLocks = 0;
hr = pDllGetClassObject(&CLSID_StdGlobalInterfaceTable, &IID_IClassFactory, (void**)&cf); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IClassFactory_QueryInterface(cf, &IID_IGlobalInterfaceTable, (void**)&object); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
IClassFactory_Release(cf);
@@ -3963,14 +3963,14 @@ static void test_globalinterfacetable(void) ok_ole_success(hr, CoCreateInstance);
ref = IGlobalInterfaceTable_AddRef(git); - ok(ref == 1, "ref=%d\n", ref); + ok(ref == 1, "ref=%ld\n", ref); ref = IGlobalInterfaceTable_AddRef(git); - ok(ref == 1, "ref=%d\n", ref); + ok(ref == 1, "ref=%ld\n", ref);
ref = IGlobalInterfaceTable_Release(git); - ok(ref == 1, "ref=%d\n", ref); + ok(ref == 1, "ref=%ld\n", ref); ref = IGlobalInterfaceTable_Release(git); - ok(ref == 1, "ref=%d\n", ref); + ok(ref == 1, "ref=%ld\n", ref);
hr = IGlobalInterfaceTable_RegisterInterfaceInGlobal(git, (IUnknown *)&Test_ClassFactory, &IID_IClassFactory, &cookie); ok_ole_success(hr, IGlobalInterfaceTable_RegisterInterfaceInGlobal); @@ -4012,7 +4012,7 @@ static void test_globalinterfacetable(void) IGlobalInterfaceTable_Release(git);
hr = CoGetClassObject(&CLSID_StdGlobalInterfaceTable, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void **)&cf); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IClassFactory_Release(cf); }
@@ -4027,77 +4027,77 @@ static void test_manualresetevent(void) HRESULT hr;
hr = pDllGetClassObject(&CLSID_ManualResetEvent, &IID_IClassFactory, (void **)&factory); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IClassFactory_Release(factory);
hr = CoGetClassObject(&CLSID_ManualResetEvent, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void **)&factory); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IClassFactory_Release(factory);
hr = CoCreateInstance(&CLSID_ManualResetEvent, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!!punk, "Got NULL.\n"); IUnknown_Release(punk);
hr = CoCreateInstance(&CLSID_ManualResetEvent, NULL, CLSCTX_INPROC_SERVER, &IID_ISynchronize, (void**)&psync1); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!!psync1, "Got NULL.\n");
hr = ISynchronize_Wait(psync1, 0, 5); - ok(hr == RPC_S_CALLPENDING, "Got 0x%08x\n", hr); + ok(hr == RPC_S_CALLPENDING, "Got 0x%08lx\n", hr);
hr = ISynchronize_Reset(psync1); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = ISynchronize_Signal(psync1); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = ISynchronize_Wait(psync1, 0, 5); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = ISynchronize_Wait(psync1, 0, 5); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = ISynchronize_Reset(psync1); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = ISynchronize_Wait(psync1, 0, 5); - ok(hr == RPC_S_CALLPENDING, "Got 0x%08x\n", hr); + ok(hr == RPC_S_CALLPENDING, "Got 0x%08lx\n", hr);
hr = CoCreateInstance(&CLSID_ManualResetEvent, NULL, CLSCTX_INPROC_SERVER, &IID_ISynchronize, (void**)&psync2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!!psync2, "Got NULL.\n"); ok(psync1 != psync2, "psync1 == psync2.\n");
hr = ISynchronize_QueryInterface(psync2, &IID_ISynchronizeHandle, (void**)&sync_handle); - ok(hr == S_OK, "QueryInterface(IID_ISynchronizeHandle) failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface(IID_ISynchronizeHandle) failed: %08lx\n", hr);
handle = NULL; hr = ISynchronizeHandle_GetHandle(sync_handle, &handle); - ok(hr == S_OK, "GetHandle failed: %08x\n", hr); + ok(hr == S_OK, "GetHandle failed: %08lx\n", hr); ok(handle != NULL && handle != INVALID_HANDLE_VALUE, "handle = %p\n", handle);
ISynchronizeHandle_Release(sync_handle);
hr = ISynchronize_Wait(psync2, 0, 5); - ok(hr == RPC_S_CALLPENDING, "Got 0x%08x\n", hr); + ok(hr == RPC_S_CALLPENDING, "Got 0x%08lx\n", hr);
hr = ISynchronize_Reset(psync1); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = ISynchronize_Reset(psync2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = ISynchronize_Signal(psync1); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = ISynchronize_Wait(psync2, 0, 5); - ok(hr == RPC_S_CALLPENDING, "Got 0x%08x\n", hr); + ok(hr == RPC_S_CALLPENDING, "Got 0x%08lx\n", hr);
ref = ISynchronize_AddRef(psync1); - ok(ref == 2, "Got ref: %d\n", ref); + ok(ref == 2, "Got ref: %ld\n", ref); ref = ISynchronize_AddRef(psync1); - ok(ref == 3, "Got ref: %d\n", ref); + ok(ref == 3, "Got ref: %ld\n", ref); ref = ISynchronize_Release(psync1); - ok(ref == 2, "Got nonzero ref: %d\n", ref); + ok(ref == 2, "Got nonzero ref: %ld\n", ref); ref = ISynchronize_Release(psync2); - ok(!ref, "Got nonzero ref: %d\n", ref); + ok(!ref, "Got nonzero ref: %ld\n", ref); ref = ISynchronize_Release(psync1); - ok(ref == 1, "Got nonzero ref: %d\n", ref); + ok(ref == 1, "Got nonzero ref: %ld\n", ref); ref = ISynchronize_Release(psync1); - ok(!ref, "Got nonzero ref: %d\n", ref); + ok(!ref, "Got nonzero ref: %ld\n", ref); }
static DWORD CALLBACK implicit_mta_unmarshal_proc(void *param) @@ -4120,7 +4120,7 @@ static DWORD CALLBACK implicit_mta_unmarshal_proc(void *param) CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void **)&proxy); - ok(hr == RPC_E_WRONG_THREAD, "got %#x\n", hr); + ok(hr == RPC_E_WRONG_THREAD, "got %#lx\n", hr);
CoUninitialize();
@@ -4150,7 +4150,7 @@ static DWORD CALLBACK implicit_mta_use_proc(void *param) CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void **)&proxy); - ok(hr == RPC_E_WRONG_THREAD, "got %#x\n", hr); + ok(hr == RPC_E_WRONG_THREAD, "got %#lx\n", hr);
CoUninitialize(); return 0; @@ -4301,8 +4301,8 @@ static void WINAPI TestChannelHook_ClientGetSize(
if (info->cbSize == sizeof(*info)) { - ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(info->iMethod == method, "iMethod was %d should be %d\n", info->iMethod, method); + ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%lx instead of 0x%lx\n", info->dwServerPid, GetCurrentProcessId()); + ok(info->iMethod == method, "iMethod was %ld should be %d\n", info->iMethod, method); ok(!info->pObject, "pObject should be NULL\n"); if (method == 3) causality = info->uCausality; @@ -4328,8 +4328,8 @@ static void WINAPI TestChannelHook_ClientFillBuffer(
if (info->cbSize == sizeof(*info)) { - ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(info->iMethod == method, "iMethod was %d should be %d\n", info->iMethod, method); + ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%lx instead of 0x%lx\n", info->dwServerPid, GetCurrentProcessId()); + ok(info->iMethod == method, "iMethod was %ld should be %d\n", info->iMethod, method); ok(!info->pObject, "pObject should be NULL\n"); ok(IsEqualGUID(&info->uCausality, &causality), "causality wasn't correct\n"); } @@ -4351,12 +4351,12 @@ static void WINAPI TestChannelHook_ClientNotify( { SChannelHookCallInfo *info = (SChannelHookCallInfo *)riid;
- if (winetest_debug > 1) trace("IChannelHook::ClientNotify(hr %#x)\n", hrFault); + if (winetest_debug > 1) trace("IChannelHook::ClientNotify(hr %#lx)\n", hrFault);
if (info->cbSize == sizeof(*info)) { - ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(info->iMethod == method, "iMethod was %d should be %d\n", info->iMethod, method); + ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%lx instead of 0x%lx\n", info->dwServerPid, GetCurrentProcessId()); + ok(info->iMethod == method, "iMethod was %ld should be %d\n", info->iMethod, method); todo_wine { ok(info->pObject != NULL, "pObject shouldn't be NULL\n"); } @@ -4380,13 +4380,13 @@ static void WINAPI TestChannelHook_ServerNotify(
if (info->cbSize == sizeof(*info)) { - ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(info->iMethod == method, "iMethod was %d should be %d\n", info->iMethod, method); + ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%lx instead of 0x%lx\n", info->dwServerPid, GetCurrentProcessId()); + ok(info->iMethod == method, "iMethod was %ld should be %d\n", info->iMethod, method); ok(info->pObject != NULL, "pObject shouldn't be NULL\n"); ok(IsEqualGUID(&info->uCausality, &causality), "causality wasn't correct\n"); }
- ok(cbDataSize == 1, "cbDataSize should have been 1 instead of %d\n", cbDataSize); + ok(cbDataSize == 1, "cbDataSize should have been 1 instead of %ld\n", cbDataSize); ok(*(unsigned char *)pDataBuffer == 0xcc, "pDataBuffer should have contained 0xcc instead of 0x%x\n", *(unsigned char *)pDataBuffer); ok(IsEqualGUID(uExtent, &EXTENTID_WineTest), "uExtent wasn't correct\n"); } @@ -4400,12 +4400,12 @@ static void WINAPI TestChannelHook_ServerGetSize( { SChannelHookCallInfo *info = (SChannelHookCallInfo *)riid;
- if (winetest_debug > 1) trace("IChannelHook::ServerGetSize(iid %s, hr %#x)\n", debugstr_guid(riid), hrFault); + if (winetest_debug > 1) trace("IChannelHook::ServerGetSize(iid %s, hr %#lx)\n", debugstr_guid(riid), hrFault);
if (info->cbSize == sizeof(*info)) { - ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(info->iMethod == method, "iMethod was %d should be %d\n", info->iMethod, method); + ok(info->dwServerPid == GetCurrentProcessId(), "dwServerPid was 0x%lx instead of 0x%lx\n", info->dwServerPid, GetCurrentProcessId()); + ok(info->iMethod == method, "iMethod was %ld should be %d\n", info->iMethod, method); ok(info->pObject != NULL, "pObject shouldn't be NULL\n"); ok(IsEqualGUID(&info->uCausality, &causality), "causality wasn't correct\n"); } diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index ec4273284e3..a507c63171c 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -46,12 +46,12 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(unk); }
-#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr)
static char const * const *expected_method_list;
@@ -95,9 +95,9 @@ static void _test_moniker_type(IMoniker *moniker, DWORD type, BOOL todo, int lin HRESULT hr;
hr = IMoniker_IsSystemMoniker(moniker, &type2); - ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#lx.\n", hr); todo_wine_if(todo) - ok_(__FILE__, line)(type2 == type, "Unexpected moniker type %d.\n", type2); + ok_(__FILE__, line)(type2 == type, "Unexpected moniker type %ld.\n", type2); }
#define TEST_DISPLAY_NAME(m,name) _test_moniker_name(m, name, __LINE__) @@ -108,10 +108,10 @@ static void _test_moniker_name(IMoniker *moniker, const WCHAR *name, int line) HRESULT hr;
hr = CreateBindCtx(0, &pbc); - ok_(__FILE__, line)(hr == S_OK, "Failed to create bind context, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to create bind context, hr %#lx.\n", hr);
hr = IMoniker_GetDisplayName(moniker, pbc, NULL, &display_name); - ok_(__FILE__, line)(hr == S_OK, "Failed to get display name, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get display name, hr %#lx.\n", hr); ok_(__FILE__, line)(!lstrcmpW(display_name, name), "Unexpected display name %s.\n", wine_dbgstr_w(display_name));
CoTaskMemFree(display_name); @@ -126,20 +126,20 @@ static IMoniker *create_antimoniker(DWORD level) HRESULT hr;
hr = CreateAntiMoniker(&moniker); - ok(hr == S_OK, "Failed to create antimoniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create antimoniker, hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
hr = IStream_Write(stream, &level, sizeof(level), NULL); - ok(hr == S_OK, "Failed to write contents, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to write contents, hr %#lx.\n", hr);
pos.QuadPart = 0; hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "Failed to rewind, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to rewind, hr %#lx.\n", hr);
hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Failed to load, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to load, hr %#lx.\n", hr);
IStream_Release(stream);
@@ -205,14 +205,14 @@ static HRESULT create_moniker_parse_desc(const char *desc, unsigned int *eaten,
comp_len = 0; hr = create_moniker_parse_desc(desc, &comp_len, &left); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
*eaten += comp_len; desc += comp_len;
comp_len = 0; hr = create_moniker_parse_desc(desc, &comp_len, &right); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
*eaten += comp_len;
@@ -285,8 +285,8 @@ static ULONG WINAPI ExternalConnection_Release(IExternalConnection *iface) static DWORD WINAPI ExternalConnection_AddConnection(IExternalConnection *iface, DWORD extconn, DWORD reserved) { struct test_factory *factory = impl_from_IExternalConnection(iface); - ok(extconn == EXTCONN_STRONG, "Unexpected connection type %d\n", extconn); - ok(!reserved, "reserved = %x\n", reserved); + ok(extconn == EXTCONN_STRONG, "Unexpected connection type %ld\n", extconn); + ok(!reserved, "reserved = %lx\n", reserved); return ++factory->external_connections; }
@@ -294,8 +294,8 @@ static DWORD WINAPI ExternalConnection_ReleaseConnection(IExternalConnection *if DWORD reserved, BOOL fLastReleaseCloses) { struct test_factory *factory = impl_from_IExternalConnection(iface); - ok(extconn == EXTCONN_STRONG, "Unexpected connection type %d\n", extconn); - ok(!reserved, "reserved = %x\n", reserved); + ok(extconn == EXTCONN_STRONG, "Unexpected connection type %ld\n", extconn); + ok(!reserved, "reserved = %lx\n", reserved); return --factory->external_connections; }
@@ -946,10 +946,10 @@ static void test_ROT(void) /* try with our own moniker that doesn't support IROTData */ hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown *)&factory.IClassFactory_iface, &test_moniker->IMoniker_iface, &dwCookie); - ok(hr == S_OK, "Failed to register interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register interface, hr %#lx.\n", hr); ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); ok(factory.external_connections == 1, "external_connections = %d\n", factory.external_connections); - ok(factory.refcount > 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount > 1, "Unexpected factory refcount %lu.\n", factory.refcount);
expected_method_list = methods_isrunning_no_ROTData; hr = IRunningObjectTable_IsRunning(pROT, &test_moniker->IMoniker_iface); @@ -959,7 +959,7 @@ static void test_ROT(void) hr = IRunningObjectTable_Revoke(pROT, dwCookie); ok_ole_success(hr, IRunningObjectTable_Revoke); ok(!factory.external_connections, "external_connections = %d\n", factory.external_connections); - ok(factory.refcount == 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount == 1, "Unexpected factory refcount %lu.\n", factory.refcount);
expected_method_list = methods_register; /* try with our own moniker */ @@ -968,7 +968,7 @@ static void test_ROT(void) &test_moniker->IMoniker_iface, &dwCookie); ok_ole_success(hr, IRunningObjectTable_Register); ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); - ok(factory.refcount > 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount > 1, "Unexpected factory refcount %lu.\n", factory.refcount);
expected_method_list = methods_isrunning; hr = IRunningObjectTable_IsRunning(pROT, &test_moniker->IMoniker_iface); @@ -978,7 +978,7 @@ static void test_ROT(void)
hr = IRunningObjectTable_Revoke(pROT, dwCookie); ok_ole_success(hr, IRunningObjectTable_Revoke); - ok(factory.refcount == 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount == 1, "Unexpected factory refcount %lu.\n", factory.refcount);
hr = CreateFileMoniker(wszFileName, &pMoniker); ok_ole_success(hr, CreateClassMoniker); @@ -988,21 +988,21 @@ static void test_ROT(void) hr = IRunningObjectTable_Register(pROT, 0, (IUnknown *)&factory.IClassFactory_iface, pMoniker, &dwCookie); ok_ole_success(hr, IRunningObjectTable_Register); ok(!factory.external_connections, "external_connections = %d\n", factory.external_connections); - ok(factory.refcount > 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount > 1, "Unexpected factory refcount %lu.\n", factory.refcount);
hr = IRunningObjectTable_Revoke(pROT, dwCookie); ok_ole_success(hr, IRunningObjectTable_Revoke); - ok(factory.refcount == 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount == 1, "Unexpected factory refcount %lu.\n", factory.refcount);
/* test flags: ROTFLAGS_REGISTRATIONKEEPSALIVE */ hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown *)&factory.IClassFactory_iface, pMoniker, &dwCookie); ok_ole_success(hr, IRunningObjectTable_Register); - ok(factory.refcount > 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount > 1, "Unexpected factory refcount %lu.\n", factory.refcount);
hr = IRunningObjectTable_Revoke(pROT, dwCookie); ok_ole_success(hr, IRunningObjectTable_Revoke); - ok(factory.refcount == 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount == 1, "Unexpected factory refcount %lu.\n", factory.refcount);
/* test flags: ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT */ /* only succeeds when process is started by SCM and has LocalService @@ -1010,36 +1010,36 @@ static void test_ROT(void) hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE | ROTFLAGS_ALLOWANYCLIENT, (IUnknown *)&factory.IClassFactory_iface, pMoniker, &dwCookie); todo_wine { - ok(hr == CO_E_WRONG_SERVER_IDENTITY, "Unexpected hr %#x.\n", hr); + ok(hr == CO_E_WRONG_SERVER_IDENTITY, "Unexpected hr %#lx.\n", hr); } if (SUCCEEDED(hr)) { hr = IRunningObjectTable_Revoke(pROT, dwCookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); }
hr = IRunningObjectTable_Register(pROT, 0xdeadbeef, (IUnknown *)&factory.IClassFactory_iface, pMoniker, &dwCookie); - ok(hr == E_INVALIDARG, "IRunningObjectTable_Register should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRunningObjectTable_Register should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
IMoniker_Release(pMoniker); IMoniker_Release(&test_moniker->IMoniker_iface);
/* Pointer moniker does not implement IROTData or display name */ hr = CreatePointerMoniker(NULL, &pMoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown *)&factory.IClassFactory_iface, pMoniker, &dwCookie); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); IMoniker_Release(pMoniker);
hr = create_moniker_from_desc("I1", &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = CreatePointerMoniker((IUnknown *)moniker, &pMoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown *)&factory.IClassFactory_iface, pMoniker, &dwCookie); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); IMoniker_Release(pMoniker); IMoniker_Release(moniker);
@@ -1069,9 +1069,9 @@ static void test_ROT_multiple_entries(void) ok_ole_success(hr, IRunningObjectTable_Register);
hr = IRunningObjectTable_Register(pROT, 0, (IUnknown *)&factory.IClassFactory_iface, pMoniker, &dwCookie2); - ok(hr == MK_S_MONIKERALREADYREGISTERED, "IRunningObjectTable_Register should have returned MK_S_MONIKERALREADYREGISTERED instead of 0x%08x\n", hr); + ok(hr == MK_S_MONIKERALREADYREGISTERED, "IRunningObjectTable_Register should have returned MK_S_MONIKERALREADYREGISTERED instead of 0x%08lx\n", hr);
- ok(dwCookie1 != dwCookie2, "cookie returned for registering duplicate object shouldn't match cookie of original object (0x%x)\n", dwCookie1); + ok(dwCookie1 != dwCookie2, "cookie returned for registering duplicate object shouldn't match cookie of original object (0x%lx)\n", dwCookie1);
hr = IRunningObjectTable_GetObject(pROT, pMoniker, &pObject); ok_ole_success(hr, IRunningObjectTable_GetObject); @@ -1237,8 +1237,8 @@ static void test_MkParseDisplayName(void) invalid_parameters[i].szDisplayName, invalid_parameters[i].pchEaten, invalid_parameters[i].ppmk); - ok(hr == E_INVALIDARG, "[%d] MkParseDisplayName should have failed with E_INVALIDARG instead of 0x%08x\n", i, hr); - ok(eaten == 0xdeadbeef, "[%d] Processed character count should have been 0xdeadbeef instead of %u\n", i, eaten); + ok(hr == E_INVALIDARG, "[%d] MkParseDisplayName should have failed with E_INVALIDARG instead of 0x%08lx\n", i, hr); + ok(eaten == 0xdeadbeef, "[%d] Processed character count should have been 0xdeadbeef instead of %lu\n", i, eaten); ok(pmk == (IMoniker *)0xdeadbeef, "[%d] Output moniker pointer should have been 0xdeadbeef instead of %p\n", i, pmk); }
@@ -1246,8 +1246,8 @@ static void test_MkParseDisplayName(void) pmk = (IMoniker *)0xdeadbeef; hr = MkParseDisplayName(pbc, wszNonExistentProgId, &eaten, &pmk); todo_wine - ok(hr == MK_E_SYNTAX, "Unexpected hr %#x.\n", hr); - ok(eaten == 0, "Processed character count should have been 0 instead of %u\n", eaten); + ok(hr == MK_E_SYNTAX, "Unexpected hr %#lx.\n", hr); + ok(eaten == 0, "Processed character count should have been 0 instead of %lu\n", eaten); ok(pmk == NULL, "Output moniker pointer should have been NULL instead of %p\n", pmk);
/* no special handling of "clsid:" without the string form of the clsid @@ -1256,8 +1256,8 @@ static void test_MkParseDisplayName(void) pmk = (IMoniker *)0xdeadbeef; hr = MkParseDisplayName(pbc, wszDisplayNameClsid, &eaten, &pmk); todo_wine - ok(hr == MK_E_SYNTAX, "Unexpected hr %#x.\n", hr); - ok(eaten == 0, "Processed character count should have been 0 instead of %u\n", eaten); + ok(hr == MK_E_SYNTAX, "Unexpected hr %#lx.\n", hr); + ok(eaten == 0, "Processed character count should have been 0 instead of %lu\n", eaten); ok(pmk == NULL, "Output moniker pointer should have been NULL instead of %p\n", pmk);
/* shows clsid has higher precedence than a running object */ @@ -1272,7 +1272,7 @@ static void test_MkParseDisplayName(void) hr = MkParseDisplayName(pbc, wszDisplayName, &eaten, &pmk); ok_ole_success(hr, MkParseDisplayName); ok(eaten == ARRAY_SIZE(wszDisplayName) - 1, - "Processed character count should have been 43 instead of %u\n", eaten); + "Processed character count should have been 43 instead of %lu\n", eaten); if (pmk) { TEST_MONIKER_TYPE(pmk, MKSYS_CLASSMONIKER); @@ -1293,7 +1293,7 @@ static void test_MkParseDisplayName(void) hr = MkParseDisplayName(pbc, wszDisplayNameRunning, &eaten, &pmk); ok_ole_success(hr, MkParseDisplayName); ok(eaten == ARRAY_SIZE(wszDisplayNameRunning) - 1, - "Processed character count should have been 15 instead of %u\n", eaten); + "Processed character count should have been 15 instead of %lu\n", eaten); if (pmk) { TEST_MONIKER_TYPE(pmk, MKSYS_FILEMONIKER); @@ -1310,7 +1310,7 @@ static void test_MkParseDisplayName(void) hr = MkParseDisplayName(pbc, wszDisplayNameProgId1, &eaten, &pmk); ok_ole_success(hr, MkParseDisplayName); ok(eaten == ARRAY_SIZE(wszDisplayNameProgId1) - 1, - "Processed character count should have been 8 instead of %u\n", eaten); + "Processed character count should have been 8 instead of %lu\n", eaten); if (pmk) { TEST_MONIKER_TYPE(pmk, MKSYS_ANTIMONIKER); @@ -1321,7 +1321,7 @@ static void test_MkParseDisplayName(void) hr = MkParseDisplayName(pbc, wszDisplayNameProgId2, &eaten, &pmk); ok_ole_success(hr, MkParseDisplayName); ok(eaten == ARRAY_SIZE(wszDisplayNameProgId2) - 1, - "Processed character count should have been 8 instead of %u\n", eaten); + "Processed character count should have been 8 instead of %lu\n", eaten); if (pmk) { TEST_MONIKER_TYPE(pmk, MKSYS_ANTIMONIKER); @@ -1332,8 +1332,8 @@ static void test_MkParseDisplayName(void) pmk = (IMoniker *)0xdeadbeef; hr = MkParseDisplayName(pbc, wszDisplayNameProgIdFail, &eaten, &pmk); todo_wine - ok(hr == MK_E_SYNTAX, "Unexpected hr %#x.\n", hr); - ok(eaten == 0, "Processed character count should have been 0 instead of %u\n", eaten); + ok(hr == MK_E_SYNTAX, "Unexpected hr %#lx.\n", hr); + ok(eaten == 0, "Processed character count should have been 0 instead of %lu\n", eaten); ok(pmk == NULL, "Output moniker pointer should have been NULL instead of %p\n", pmk);
hr = CoRevokeClassObject(pdwReg1); @@ -1345,7 +1345,7 @@ static void test_MkParseDisplayName(void) ARRAY_SIZE(wszDisplayNameFile)); hr = MkParseDisplayName(pbc, wszDisplayNameFile, &eaten, &pmk); ok_ole_success(hr, MkParseDisplayName); - ok(eaten == len - 1, "Processed character count should have been %d instead of %u\n", len - 1, eaten); + ok(eaten == len - 1, "Processed character count should have been %d instead of %lu\n", len - 1, eaten); if (pmk) { TEST_MONIKER_TYPE(pmk, MKSYS_FILEMONIKER); @@ -1355,7 +1355,7 @@ static void test_MkParseDisplayName(void) hr = MkParseDisplayName(pbc, wszDisplayName, &eaten, &pmk); ok_ole_success(hr, MkParseDisplayName); ok(eaten == ARRAY_SIZE(wszDisplayName) - 1, - "Processed character count should have been 43 instead of %u\n", eaten); + "Processed character count should have been 43 instead of %lu\n", eaten);
if (pmk) { @@ -1373,29 +1373,29 @@ static void test_MkParseDisplayName(void) ok_ole_success(hr, CreateBindCtx);
hr = CreateFileMoniker(wszFileName1, &pmk1); - ok(hr == S_OK, "Failed to create file moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create file moniker, hr %#lx.\n", hr); hr = CreateFileMoniker(wszFileName2, &pmk2); - ok(hr == S_OK, "Failed to create file moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create file moniker, hr %#lx.\n", hr); hr = IBindCtx_GetRunningObjectTable(pbc, &pprot); - ok(hr == S_OK, "Failed to get ROT, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get ROT, hr %#lx.\n", hr);
/* Check EnumMoniker before registering */ hr = IRunningObjectTable_EnumRunning(pprot, &spEM1); - ok(hr == S_OK, "Failed to get enum object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get enum object, hr %#lx.\n", hr); hr = IEnumMoniker_QueryInterface(spEM1, &IID_IUnknown, (void *)&lpEM1); /* Register a couple of Monikers and check is ok */ - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
matchCnt = count_moniker_matches(pbc, spEM1);
hr = IRunningObjectTable_Register(pprot, ROTFLAGS_REGISTRATIONKEEPSALIVE, lpEM1, pmk1, &pdwReg1); - ok(hr == S_OK, "Failed to register object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register object, hr %#lx.\n", hr);
hr = IRunningObjectTable_Register(pprot, ROTFLAGS_REGISTRATIONKEEPSALIVE, lpEM1, pmk2, &pdwReg2); - ok(hr == S_OK, "Failed to register object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register object, hr %#lx.\n", hr);
hr = IRunningObjectTable_EnumRunning(pprot, &spEM2); - ok(hr == S_OK, "Failed to get enum object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get enum object, hr %#lx.\n", hr);
matchCnt = count_moniker_matches(pbc, spEM2); ok(matchCnt==2, "Number of matches should be equal to 2 not %i\n", matchCnt); @@ -1410,9 +1410,9 @@ static void test_MkParseDisplayName(void) ok(matchCnt==2, "Number of matches should be equal to 2 not %i\n", matchCnt);
hr = IRunningObjectTable_Revoke(pprot,pdwReg1); - ok(hr == S_OK, "Failed to revoke, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to revoke, hr %#lx.\n", hr); hr = IRunningObjectTable_Revoke(pprot,pdwReg2); - ok(hr == S_OK, "Failed to revoke, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to revoke, hr %#lx.\n", hr); IUnknown_Release(lpEM1); IEnumMoniker_Release(spEM1); IEnumMoniker_Release(spEM2); @@ -1726,13 +1726,13 @@ static void test_moniker( IMoniker * moniker_proxy;
hr = IMoniker_IsDirty(moniker); - ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", testname, hr); + ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n", testname, hr);
/* Display Name */ TEST_DISPLAY_NAME(moniker, expected_display_name);
hr = IMoniker_IsDirty(moniker); - ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", testname, hr); + ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n", testname, hr);
/* IROTData::GetComparisonData test */
@@ -1746,7 +1746,7 @@ static void test_moniker(
/* first check we have the right amount of data */ ok(moniker_size == sizeof_expected_moniker_comparison_data, - "%s: Size of comparison data differs (expected %d, actual %d)\n", + "%s: Size of comparison data differs (expected %d, actual %ld)\n", testname, sizeof_expected_moniker_comparison_data, moniker_size);
/* then do a byte-by-byte comparison */ @@ -1782,9 +1782,9 @@ static void test_moniker( IMoniker_IsSystemMoniker(moniker, &moniker_type);
hr = IMoniker_GetSizeMax(moniker, &max_size); - ok(hr == S_OK, "Failed to get max size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get max size, hr %#lx.\n", hr); todo_wine_if(moniker_type == MKSYS_GENERICCOMPOSITE) - ok(expected_max_size == max_size.u.LowPart, "%s: unexpected max size %u.\n", testname, max_size.u.LowPart); + ok(expected_max_size == max_size.u.LowPart, "%s: unexpected max size %lu.\n", testname, max_size.u.LowPart);
hr = IMoniker_Save(moniker, stream, TRUE); ok_ole_success(hr, IMoniker_Save); @@ -1798,7 +1798,7 @@ static void test_moniker(
/* first check we have the right amount of data */ ok(moniker_size == round_global_size(sizeof_expected_moniker_saved_data), - "%s: Size of saved data differs (expected %d, actual %d)\n", + "%s: Size of saved data differs (expected %ld, actual %ld)\n", testname, (DWORD)round_global_size(sizeof_expected_moniker_saved_data), moniker_size);
/* then do a byte-by-byte comparison */ @@ -1845,7 +1845,7 @@ static void test_moniker(
/* first check we have the right amount of data */ ok(moniker_size == round_global_size(sizeof_expected_moniker_marshal_data), - "%s: Size of marshaled data differs (expected %d, actual %d)\n", + "%s: Size of marshaled data differs (expected %ld, actual %ld)\n", testname, (DWORD)round_global_size(sizeof_expected_moniker_marshal_data), moniker_size);
/* then do a byte-by-byte comparison */ @@ -1920,15 +1920,15 @@ static void test_class_moniker(void) DWORD *data;
hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { eaten = 0xdeadbeef; hr = MkParseDisplayName(bindctx, tests[i].name, &eaten, &moniker); todo_wine_if(i == 5) - ok(hr == tests[i].hr, "%u: unexpected hr %#x.\n", i, hr); - ok(eaten == tests[i].eaten, "%u: unexpected eaten length %u, expected %u.\n", i, eaten, tests[i].eaten); + ok(hr == tests[i].hr, "%u: unexpected hr %#lx.\n", i, hr); + ok(eaten == tests[i].eaten, "%u: unexpected eaten length %lu, expected %lu.\n", i, eaten, tests[i].eaten); if (SUCCEEDED(hr)) { TEST_MONIKER_TYPE(moniker, MKSYS_CLASSMONIKER); @@ -1938,35 +1938,35 @@ static void test_class_moniker(void)
/* Extended syntax, handled by class moniker directly, only CLSID is meaningful for equality. */ hr = MkParseDisplayName(bindctx, L"clsid:11111111-0000-0000-2222-444444444444;extra data:", &eaten, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(eaten == 54, "Unexpected length %u.\n", eaten); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(eaten == 54, "Unexpected length %lu.\n", eaten);
hr = MkParseDisplayName(bindctx, L"clsid:11111111-0000-0000-2222-444444444444;different extra data:", &eaten, &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DISPLAY_NAME(moniker, L"clsid:11111111-0000-0000-2222-444444444444;extra data:"); TEST_MONIKER_TYPE(moniker, MKSYS_CLASSMONIKER); hr = IMoniker_GetSizeMax(moniker, &size); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(size.LowPart == 44, "Unexpected size %u.\n", size.LowPart); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(size.LowPart == 44, "Unexpected size %lu.\n", size.LowPart);
TEST_MONIKER_TYPE(moniker2, MKSYS_CLASSMONIKER);
hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker2, moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker2); IMoniker_Release(moniker);
/* From persistent state */ hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateClassMoniker(&GUID_NULL, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(moniker, &IID_IMoniker, TRUE); check_interface(moniker, &IID_IPersist, TRUE); @@ -1976,44 +1976,44 @@ static void test_class_moniker(void) check_interface(moniker, &IID_IMarshal, TRUE);
hr = IMoniker_GetSizeMax(moniker, &size); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(size.QuadPart == 20, "Unexpected size %u.\n", size.LowPart); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(size.QuadPart == 20, "Unexpected size %lu.\n", size.LowPart);
hr = IStream_Write(stream, &CLSID_StdComponentCategoriesMgr, sizeof(CLSID), NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); length = 5 * sizeof(WCHAR); hr = IStream_Write(stream, &length, sizeof(length), NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IStream_Write(stream, L"data", length, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); pos.QuadPart = 0; hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetSizeMax(moniker, &size); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(size.QuadPart == 30, "Unexpected size %u.\n", size.LowPart); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(size.QuadPart == 30, "Unexpected size %lu.\n", size.LowPart); TEST_DISPLAY_NAME(moniker, L"clsid:0002E005-0000-0000-C000-000000000046data:"); IStream_Release(stream);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = GetHGlobalFromStream(stream, &hglobal); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Save(moniker, stream, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
length = GlobalSize(hglobal); data = GlobalLock(hglobal); - ok(length == 30, "Unexpected stream size %u.\n", length); + ok(length == 30, "Unexpected stream size %lu.\n", length); ok(IsEqualGUID((CLSID *)data, &CLSID_StdComponentCategoriesMgr), "Unexpected clsid.\n"); data += sizeof(CLSID) / sizeof(*data); - ok(*data == 10, "Unexpected data length %u.\n", *data); + ok(*data == 10, "Unexpected data length %lu.\n", *data); data++; ok(!lstrcmpW((WCHAR *)data, L"data"), "Unexpected data.\n");
@@ -2021,10 +2021,10 @@ static void test_class_moniker(void)
/* Extra data does not affect comparison */ hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rotdata); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IROTData_GetComparisonData(rotdata, buffer, sizeof(buffer), &length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(length == sizeof(expected_class_moniker_comparison_data), "Unexpected comparison data length %u.\n", length); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(length == sizeof(expected_class_moniker_comparison_data), "Unexpected comparison data length %lu.\n", length); ok(!memcmp(buffer, expected_class_moniker_comparison_data, length), "Unexpected data.\n"); IROTData_Release(rotdata);
@@ -2034,11 +2034,11 @@ static void test_class_moniker(void) ok_ole_success(hr, CreateClassMoniker);
hr = IMoniker_GetSizeMax(moniker, &size); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(size.LowPart == 20, "Unexpected size %u.\n", size.LowPart); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(size.LowPart == 20, "Unexpected size %lu.\n", size.LowPart);
hr = IMoniker_QueryInterface(moniker, &CLSID_ClassMoniker, (void **)&unknown); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unknown == (IUnknown *)moniker, "Unexpected interface.\n"); IUnknown_Release(unknown);
@@ -2054,7 +2054,7 @@ static void test_class_moniker(void) ok_ole_success(hr, IMoniker_Hash);
ok(hash == CLSID_StdComponentCategoriesMgr.Data1, - "Hash value != Data1 field of clsid, instead was 0x%08x\n", + "Hash value != Data1 field of clsid, instead was 0x%08lx\n", hash);
/* IsSystemMoniker test */ @@ -2062,13 +2062,13 @@ static void test_class_moniker(void)
/* IsRunning test */ hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL); - ok(hr == E_NOTIMPL, "IMoniker_IsRunning should return E_NOTIMPL, not 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "IMoniker_IsRunning should return E_NOTIMPL, not 0x%08lx\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == E_NOTIMPL, "IMoniker_IsRunning should return E_NOTIMPL, not 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "IMoniker_IsRunning should return E_NOTIMPL, not 0x%08lx\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == MK_E_UNAVAILABLE, "IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08x\n", hr); + ok(hr == MK_E_UNAVAILABLE, "IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08lx\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); ok_ole_success(hr, IMoniker_BindToObject); @@ -2079,30 +2079,30 @@ static void test_class_moniker(void) IUnknown_Release(unknown);
hr = IMoniker_Inverse(moniker, &inverse); - ok(hr == S_OK, "Failed to get inverse, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get inverse, hr %#lx.\n", hr); TEST_MONIKER_TYPE(inverse, MKSYS_ANTIMONIKER); IMoniker_Release(inverse);
/* Reduce() */ hr = IMoniker_Reduce(moniker, NULL, MKRREDUCE_ALL, NULL, &reduced); - ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#lx.\n", hr); ok(reduced == moniker, "Unexpected moniker.\n"); IMoniker_Release(reduced);
/* Enum() */ enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker, TRUE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!enummoniker, "Unexpected pointer.\n");
enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker, FALSE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!enummoniker, "Unexpected pointer.\n");
hr = IMoniker_Enum(moniker, FALSE, NULL); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IBindCtx_Release(bindctx);
@@ -2111,35 +2111,35 @@ static void test_class_moniker(void) /* C + A -> () */ anti = create_antimoniker(1); hr = IMoniker_ComposeWith(moniker, anti, TRUE, &moniker2); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n"); IMoniker_Release(anti);
/* C + A2 -> () */ anti = create_antimoniker(2); hr = IMoniker_ComposeWith(moniker, anti, TRUE, &moniker2); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n"); IMoniker_Release(anti);
/* C + (A,I) -> I */ hr = create_moniker_from_desc("CA1I1", &c); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, TRUE, &moniker2); - ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, FALSE, &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_ITEMMONIKER); IMoniker_Release(moniker2); IMoniker_Release(c);
/* C + (A2,I) -> I */ hr = create_moniker_from_desc("CA1I1", &c); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, TRUE, &moniker2); - ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, FALSE, &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_ITEMMONIKER); IMoniker_Release(moniker2); IMoniker_Release(c); @@ -2161,12 +2161,12 @@ static void test_file_moniker(WCHAR* path) ok_ole_success(hr, CreateFileMoniker);
hr = IMoniker_QueryInterface(moniker1, &CLSID_FileMoniker, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk == (IUnknown *)moniker1, "Unexpected interface.\n"); IUnknown_Release(unk);
hr = IMoniker_Inverse(moniker1, &inverse); - ok(hr == S_OK, "Failed to get inverse, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get inverse, hr %#lx.\n", hr); TEST_MONIKER_TYPE(inverse, MKSYS_ANTIMONIKER); IMoniker_Release(inverse);
@@ -2190,41 +2190,41 @@ static void test_file_moniker(WCHAR* path)
/* Reduce() */ hr = CreateBindCtx(0, &bind_ctx); - ok(hr == S_OK, "Failed to create bind context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create bind context, hr %#lx.\n", hr);
hr = IMoniker_Reduce(moniker1, NULL, MKRREDUCE_ALL, NULL, &reduced); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Reduce(moniker1, bind_ctx, MKRREDUCE_ALL, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
m3 = anti = create_antimoniker(1); hr = IMoniker_Reduce(moniker1, bind_ctx, MKRREDUCE_ALL, &m3, &reduced); - ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#lx.\n", hr); ok(reduced == moniker1, "Unexpected moniker.\n"); ok(m3 == anti, "Unexpected pointer.\n"); IMoniker_Release(reduced); IMoniker_Release(anti);
hr = IMoniker_Reduce(moniker1, bind_ctx, MKRREDUCE_ALL, NULL, &reduced); - ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#lx.\n", hr); ok(reduced == moniker1, "Unexpected moniker.\n"); IMoniker_Release(reduced);
/* Enum() */ enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker1, TRUE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!enummoniker, "Unexpected pointer.\n");
enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker1, FALSE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!enummoniker, "Unexpected pointer.\n");
hr = IMoniker_Enum(moniker1, FALSE, NULL); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IBindCtx_Release(bind_ctx);
@@ -2236,17 +2236,17 @@ static void test_file_moniker(WCHAR* path) /* F + A -> () */ anti = create_antimoniker(1); hr = IMoniker_ComposeWith(moniker1, anti, TRUE, &moniker2); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n"); IMoniker_Release(anti);
/* I + A2 -> (A) */ anti = create_antimoniker(2); hr = IMoniker_ComposeWith(moniker1, anti, TRUE, &moniker2); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_ANTIMONIKER); hr = IMoniker_Hash(moniker2, &hash); - ok(hr == S_OK, "Failed to get hash, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get hash, hr %#lx.\n", hr); ok(hash == 0x80000001, "Unexpected hash.\n"); IMoniker_Release(moniker2);
@@ -2305,11 +2305,11 @@ static void test_file_monikers(void)
hr = StgCreateStorageEx(filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, STGFMT_STORAGE, 0, NULL, NULL, &IID_IStorage, (void **)&storage); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IStorage_Release(storage);
hr = CreateFileMoniker(filename, &moniker); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
check_interface(moniker, &IID_IMoniker, TRUE); todo_wine @@ -2320,33 +2320,33 @@ static void test_file_monikers(void) check_interface(moniker, &IID_IMarshal, TRUE);
hr = IMoniker_BindToStorage(moniker, NULL, NULL, &IID_IStorage, (void **)&storage); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "Failed to create bind context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create bind context, hr %#lx.\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IStorage, (void **)&storage); - ok(hr == STG_E_INVALIDFLAG, "Unexpected hr %#x.\n", hr); + ok(hr == STG_E_INVALIDFLAG, "Unexpected hr %#lx.\n", hr);
bind_opts.cbStruct = sizeof(bind_opts); bind_opts.grfMode = STGM_READWRITE | STGM_SHARE_DENY_WRITE; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IStorage, (void **)&storage); - ok(hr == STG_E_INVALIDFLAG, "Unexpected hr %#x.\n", hr); + ok(hr == STG_E_INVALIDFLAG, "Unexpected hr %#lx.\n", hr);
bind_opts.grfMode = STGM_READ | STGM_SHARE_DENY_WRITE; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IStorage, (void **)&storage); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
memset(&statstg, 0, sizeof(statstg)); hr = IStorage_Stat(storage, &statstg, STATFLAG_NONAME); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(statstg.grfMode == (STGM_READ | STGM_SHARE_DENY_WRITE), "Unexpected mode %#x.\n", statstg.grfMode); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(statstg.grfMode == (STGM_READ | STGM_SHARE_DENY_WRITE), "Unexpected mode %#lx.\n", statstg.grfMode);
IStorage_Release(storage); IBindCtx_Release(bindctx); @@ -2356,16 +2356,16 @@ static void test_file_monikers(void)
/* IsEqual() */ hr = CreateFileMoniker(L"test.bmp", &moniker); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
hr = CreateFileMoniker(L"TEST.bmp", &moniker2); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker2); IMoniker_Release(moniker); @@ -2454,10 +2454,10 @@ static void test_item_moniker(void) IStream *stream;
hr = CreateItemMoniker(NULL, wszObjectName, &moniker); - ok(hr == S_OK, "Failed to create item moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create item moniker, hr %#lx.\n", hr);
hr = IMoniker_QueryInterface(moniker, &CLSID_ItemMoniker, (void **)&unknown); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unknown == (IUnknown *)moniker, "Unexpected interface.\n"); IUnknown_Release(unknown);
@@ -2470,7 +2470,7 @@ static void test_item_moniker(void) IMoniker_Release(moniker);
hr = CreateItemMoniker(L"", wszObjectName, &moniker); - ok(hr == S_OK, "Failed to create item moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create item moniker, hr %#lx.\n", hr);
test_moniker("item moniker 3", moniker, expected_item_moniker_marshal_data3, sizeof(expected_item_moniker_marshal_data3), @@ -2481,7 +2481,7 @@ static void test_item_moniker(void) IMoniker_Release(moniker);
hr = CreateItemMoniker(L"&&", wszObjectName, &moniker); - ok(hr == S_OK, "Failed to create item moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create item moniker, hr %#lx.\n", hr);
test_moniker("item moniker 4", moniker, expected_item_moniker_marshal_data4, sizeof(expected_item_moniker_marshal_data4), @@ -2492,7 +2492,7 @@ static void test_item_moniker(void) IMoniker_Release(moniker);
hr = CreateItemMoniker(L"ab", wszObjectName, &moniker); - ok(hr == S_OK, "Failed to create item moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create item moniker, hr %#lx.\n", hr);
test_moniker("item moniker 5", moniker, expected_item_moniker_marshal_data5, sizeof(expected_item_moniker_marshal_data5), @@ -2502,29 +2502,29 @@ static void test_item_moniker(void)
/* Serialize and load back. */ hr = CreateItemMoniker(NULL, L"object", &moniker2); - ok(hr == S_OK, "Failed to create item moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create item moniker, hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "Failed to create bind context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create bind context, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(item_moniker_data); ++i) { pos.QuadPart = 0; hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "Failed to seek stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to seek stream, hr %#lx.\n", hr);
hr = IStream_Write(stream, item_moniker_data[i].data, item_moniker_data[i].data_len, NULL); - ok(hr == S_OK, "Failed to write stream contents, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to write stream contents, hr %#lx.\n", hr);
pos.QuadPart = 0; hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "Failed to seek stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to seek stream, hr %#lx.\n", hr);
hr = IMoniker_Load(moniker2, stream); - ok(hr == S_OK, "Failed to load moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to load moniker, hr %#lx.\n", hr);
TEST_DISPLAY_NAME(moniker2, item_moniker_data[i].display_name); } @@ -2539,11 +2539,11 @@ static void test_item_moniker(void) for (i = 0; i < ARRAY_SIZE(hash_tests); ++i) { hr = CreateItemMoniker(hash_tests[i].delim, hash_tests[i].item, &moniker); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
hr = IMoniker_Hash(moniker, &hash); - ok(hr == S_OK, "Failed to get hash value, hr %#x.\n", hr); - ok(hash == hash_tests[i].hash, "%d: unexpected hash value %#x.\n", i, hash); + ok(hr == S_OK, "Failed to get hash value, hr %#lx.\n", hr); + ok(hash == hash_tests[i].hash, "%ld: unexpected hash value %#lx.\n", i, hash);
IMoniker_Release(moniker); } @@ -2564,154 +2564,154 @@ static void test_item_moniker(void)
/* IsRunning test */ hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "IMoniker_IsRunning should return E_INVALIDARG, not 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IMoniker_IsRunning should return E_INVALIDARG, not 0x%08lx\n", hr);
hr = IMoniker_IsRunning(moniker, NULL, &container_moniker->IMoniker_iface, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08x\n", hr); + ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08lx\n", hr);
hr = CreateItemMoniker(wszDelimiter, wszObjectName, &moniker2); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr); hr = IMoniker_IsRunning(moniker, bindctx, NULL, moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMoniker_Release(moniker2);
/* Different moniker as newly running. */ hr = CreateItemMoniker(wszDelimiter, L"Item123", &moniker2); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, NULL, moniker2); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IBindCtx_GetRunningObjectTable(bindctx, &rot); - ok(hr == S_OK, "Failed to get ROT, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get ROT, hr %#lx.\n", hr);
hr = IRunningObjectTable_Register(rot, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown *)moniker, moniker, &cookie); - ok(hr == S_OK, "Failed to register, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register, hr %#lx.\n", hr);
hr = IRunningObjectTable_IsRunning(rot, moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, NULL, moniker2); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IRunningObjectTable_Revoke(rot, cookie); - ok(hr == S_OK, "Failed to revoke registration, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to revoke registration, hr %#lx.\n", hr);
IRunningObjectTable_Release(rot);
expected_method_list = methods_isrunning; hr = IMoniker_IsRunning(moniker, bindctx, &container_moniker->IMoniker_iface, NULL); - ok(hr == 0x8beef000, "Unexpected hr %#x.\n", hr); + ok(hr == 0x8beef000, "Unexpected hr %#lx.\n", hr);
expected_method_list = methods_isrunning; hr = IMoniker_IsRunning(moniker, bindctx, &container_moniker->IMoniker_iface, moniker2); - ok(hr == 0x8beef000, "Unexpected hr %#x.\n", hr); + ok(hr == 0x8beef000, "Unexpected hr %#lx.\n", hr); expected_method_list = NULL;
IMoniker_Release(moniker2);
/* BindToObject() */ hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08lx\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, &container_moniker->IMoniker_iface, &IID_IUnknown, (void **)&unknown); - ok(hr == (0x8bee0000 | BINDSPEED_INDEFINITE), "Unexpected hr %#x.\n", hr); + ok(hr == (0x8bee0000 | BINDSPEED_INDEFINITE), "Unexpected hr %#lx.\n", hr);
bind_opts.cbStruct = sizeof(bind_opts); hr = IBindCtx_GetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Failed to get bind options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get bind options, hr %#lx.\n", hr);
bind_opts.dwTickCountDeadline = 1; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Failed to set bind options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bind options, hr %#lx.\n", hr); hr = IMoniker_BindToObject(moniker, bindctx, &container_moniker->IMoniker_iface, &IID_IUnknown, (void **)&unknown); - ok(hr == (0x8bee0000 | BINDSPEED_IMMEDIATE), "Unexpected hr %#x.\n", hr); + ok(hr == (0x8bee0000 | BINDSPEED_IMMEDIATE), "Unexpected hr %#lx.\n", hr);
bind_opts.dwTickCountDeadline = 2499; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Failed to set bind options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bind options, hr %#lx.\n", hr); hr = IMoniker_BindToObject(moniker, bindctx, &container_moniker->IMoniker_iface, &IID_IUnknown, (void **)&unknown); - ok(hr == (0x8bee0000 | BINDSPEED_IMMEDIATE), "Unexpected hr %#x.\n", hr); + ok(hr == (0x8bee0000 | BINDSPEED_IMMEDIATE), "Unexpected hr %#lx.\n", hr);
bind_opts.dwTickCountDeadline = 2500; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Failed to set bind options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bind options, hr %#lx.\n", hr); hr = IMoniker_BindToObject(moniker, bindctx, &container_moniker->IMoniker_iface, &IID_IUnknown, (void **)&unknown); - ok(hr == (0x8bee0000 | BINDSPEED_MODERATE), "Unexpected hr %#x.\n", hr); + ok(hr == (0x8bee0000 | BINDSPEED_MODERATE), "Unexpected hr %#lx.\n", hr);
/* BindToStorage() */ hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, &container_moniker->IMoniker_iface, &IID_IUnknown, (void **)&unknown); - ok(hr == 0x8bee0001, "Unexpected hr %#x.\n", hr); + ok(hr == 0x8bee0001, "Unexpected hr %#lx.\n", hr);
/* ParseDisplayName() */ hr = IMoniker_ParseDisplayName(moniker, bindctx, NULL, displayname, &eaten, &moniker2); - ok(hr == MK_E_SYNTAX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_SYNTAX, "Unexpected hr %#lx.\n", hr);
bind_opts.dwTickCountDeadline = 0; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Failed to set bind options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bind options, hr %#lx.\n", hr); hr = IMoniker_ParseDisplayName(moniker, bindctx, &container_moniker->IMoniker_iface, displayname, &eaten, &moniker2); - ok(hr == (0x8bee0000 | BINDSPEED_INDEFINITE), "Unexpected hr %#x.\n", hr); + ok(hr == (0x8bee0000 | BINDSPEED_INDEFINITE), "Unexpected hr %#lx.\n", hr);
bind_opts.dwTickCountDeadline = 1; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Failed to set bind options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bind options, hr %#lx.\n", hr); hr = IMoniker_ParseDisplayName(moniker, bindctx, &container_moniker->IMoniker_iface, displayname, &eaten, &moniker2); - ok(hr == (0x8bee0000 | BINDSPEED_IMMEDIATE), "Unexpected hr %#x.\n", hr); + ok(hr == (0x8bee0000 | BINDSPEED_IMMEDIATE), "Unexpected hr %#lx.\n", hr);
bind_opts.dwTickCountDeadline = 2499; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Failed to set bind options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bind options, hr %#lx.\n", hr); hr = IMoniker_ParseDisplayName(moniker, bindctx, &container_moniker->IMoniker_iface, displayname, &eaten, &moniker2); - ok(hr == (0x8bee0000 | BINDSPEED_IMMEDIATE), "Unexpected hr %#x.\n", hr); + ok(hr == (0x8bee0000 | BINDSPEED_IMMEDIATE), "Unexpected hr %#lx.\n", hr);
bind_opts.dwTickCountDeadline = 2500; hr = IBindCtx_SetBindOptions(bindctx, &bind_opts); - ok(hr == S_OK, "Failed to set bind options, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bind options, hr %#lx.\n", hr); hr = IMoniker_ParseDisplayName(moniker, bindctx, &container_moniker->IMoniker_iface, displayname, &eaten, &moniker2); - ok(hr == (0x8bee0000 | BINDSPEED_MODERATE), "Unexpected hr %#x.\n", hr); + ok(hr == (0x8bee0000 | BINDSPEED_MODERATE), "Unexpected hr %#lx.\n", hr);
IMoniker_Release(&container_moniker->IMoniker_iface);
IBindCtx_Release(bindctx);
hr = IMoniker_Inverse(moniker, &inverse); - ok(hr == S_OK, "Failed to get inverse, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get inverse, hr %#lx.\n", hr); TEST_MONIKER_TYPE(inverse, MKSYS_ANTIMONIKER); IMoniker_Release(inverse);
/* Reduce() */ hr = IMoniker_Reduce(moniker, NULL, MKRREDUCE_ALL, NULL, &reduced); - ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#lx.\n", hr); ok(reduced == moniker, "Unexpected moniker.\n"); IMoniker_Release(reduced);
/* Enum() */ enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker, TRUE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!enummoniker, "Unexpected pointer.\n");
enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker, FALSE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!enummoniker, "Unexpected pointer.\n");
hr = IMoniker_Enum(moniker, FALSE, NULL); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker);
@@ -2719,16 +2719,16 @@ static void test_item_moniker(void) for (i = 0; i < ARRAY_SIZE(isequal_tests); ++i) { hr = CreateItemMoniker(isequal_tests[i].delim1, isequal_tests[i].item1, &moniker); - ok(hr == S_OK, "Failed to create moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create moniker, hr %#lx.\n", hr);
hr = CreateItemMoniker(isequal_tests[i].delim2, isequal_tests[i].item2, &moniker2); - ok(hr == S_OK, "Failed to create moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create moniker, hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == isequal_tests[i].hr, "%d: unexpected result %#x.\n", i, hr); + ok(hr == isequal_tests[i].hr, "%ld: unexpected result %#lx.\n", i, hr);
hr = IMoniker_IsEqual(moniker2, moniker); - ok(hr == isequal_tests[i].hr, "%d: unexpected result %#x.\n", i, hr); + ok(hr == isequal_tests[i].hr, "%ld: unexpected result %#lx.\n", i, hr);
IMoniker_Release(moniker); IMoniker_Release(moniker2); @@ -2736,7 +2736,7 @@ static void test_item_moniker(void)
/* Default instance. */ hr = CoCreateInstance(&CLSID_ItemMoniker, NULL, CLSCTX_SERVER, &IID_IMoniker, (void **)&moniker); - ok(hr == S_OK, "Failed to create item moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create item moniker, hr %#lx.\n", hr);
test_moniker("item moniker 6", moniker, expected_item_moniker_marshal_data6, sizeof(expected_item_moniker_marshal_data6), @@ -2745,28 +2745,28 @@ static void test_item_moniker(void) 34, L"");
hr = CoCreateInstance(&CLSID_ItemMoniker, (IUnknown *)moniker, CLSCTX_SERVER, &IID_IMoniker, (void **)&moniker2); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker);
/* ComposeWith() */ hr = CreateItemMoniker(L"!", L"Item", &moniker); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
/* I + A -> () */ anti = create_antimoniker(1); hr = IMoniker_ComposeWith(moniker, anti, TRUE, &moniker2); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n"); IMoniker_Release(anti);
/* I + A2 -> A */ anti = create_antimoniker(2); hr = IMoniker_ComposeWith(moniker, anti, TRUE, &moniker2); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_ANTIMONIKER); hr = IMoniker_Hash(moniker2, &hash); - ok(hr == S_OK, "Failed to get hash, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get hash, hr %#lx.\n", hr); ok(hash == 0x80000001, "Unexpected hash.\n"); IMoniker_Release(moniker2);
@@ -2777,14 +2777,14 @@ static void test_item_moniker(void) /* Simplification has to through generic composite logic, even when resolved to non-composite, generic composite option has to be enabled. */ hr = create_moniker_from_desc("CA1A3", &c); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, TRUE, &moniker2); - ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, FALSE, &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_ANTIMONIKER); hr = IMoniker_Hash(moniker2, &hash); - ok(hr == S_OK, "Failed to get hash, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get hash, hr %#lx.\n", hr); ok(hash == 0x80000003, "Unexpected hash.\n"); IMoniker_Release(moniker2); IMoniker_Release(c); @@ -2793,25 +2793,25 @@ static void test_item_moniker(void)
/* CommonPrefixWith */ hr = CreateItemMoniker(L"!", L"Item", &moniker); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr); hr = CreateItemMoniker(L"#", L"Item", &moniker2); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3); - ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_US, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker, "Unexpected object.\n"); IMoniker_Release(moniker3);
IMoniker_Release(moniker2);
hr = CreateItemMoniker(L"!", L"Item2", &moniker2); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
moniker3 = (void *)0xdeadbeef; hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3); todo_wine { - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr); ok(!moniker3, "Unexpected object.\n"); }
@@ -2821,19 +2821,19 @@ static void test_item_moniker(void)
/* RelativePathTo() */ hr = create_moniker_from_desc("I1", &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = create_moniker_from_desc("I2", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_RelativePathTo(moniker, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_RelativePathTo(moniker, NULL, &moniker2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_RelativePathTo(moniker, moniker1, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); moniker2 = (void *)0xdeadbeef; hr = IMoniker_RelativePathTo(moniker, moniker1, &moniker2); - ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n");
IMoniker_Release(moniker1); @@ -2847,13 +2847,13 @@ static void stream_write_dword(IStream *stream, DWORD value)
pos.QuadPart = 0; hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "Failed to seek, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to seek, hr %#lx.\n", hr);
hr = IStream_Write(stream, &value, sizeof(value), NULL); - ok(hr == S_OK, "Stream write failed, hr %#x.\n", hr); + ok(hr == S_OK, "Stream write failed, hr %#lx.\n", hr);
hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "Failed to seek, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to seek, hr %#lx.\n", hr); }
static void test_anti_moniker(void) @@ -2880,7 +2880,7 @@ static void test_anti_moniker(void) check_interface(moniker, &IID_IMarshal, TRUE);
hr = IMoniker_QueryInterface(moniker, &CLSID_AntiMoniker, (void **)&unknown); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unknown == (IUnknown *)moniker, "Unexpected interface.\n"); IUnknown_Release(unknown);
@@ -2894,14 +2894,14 @@ static void test_anti_moniker(void) hr = IMoniker_Hash(moniker, &hash); ok_ole_success(hr, IMoniker_Hash); ok(hash == 0x80000001, - "Hash value != 0x80000001, instead was 0x%08x\n", + "Hash value != 0x80000001, instead was 0x%08lx\n", hash);
/* IsSystemMoniker test */ TEST_MONIKER_TYPE(moniker, MKSYS_ANTIMONIKER);
hr = IMoniker_Inverse(moniker, &inverse); - ok(hr == MK_E_NOINVERSE, "IMoniker_Inverse should have returned MK_E_NOINVERSE instead of 0x%08x\n", hr); + ok(hr == MK_E_NOINVERSE, "IMoniker_Inverse should have returned MK_E_NOINVERSE instead of 0x%08lx\n", hr); ok(inverse == NULL, "inverse should have been set to NULL instead of %p\n", inverse);
hr = CreateBindCtx(0, &bindctx); @@ -2909,28 +2909,28 @@ static void test_anti_moniker(void)
/* IsRunning test */ hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08x\n", hr); + ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08lx\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == E_NOTIMPL, "IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08lx\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_NOTIMPL, "IMoniker_BindToObject should return E_NOTIMPL, not 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "IMoniker_BindToObject should return E_NOTIMPL, not 0x%08lx\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_NOTIMPL, "IMoniker_BindToStorage should return E_NOTIMPL, not 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "IMoniker_BindToStorage should return E_NOTIMPL, not 0x%08lx\n", hr);
/* ComposeWith */ hr = CreateAntiMoniker(&moniker2); - ok(hr == S_OK, "Failed to create moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create moniker, hr %#lx.\n", hr);
moniker3 = moniker; hr = IMoniker_ComposeWith(moniker, moniker2, TRUE, &moniker3); - ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#lx.\n", hr); ok(!moniker3, "Unexpected interface.\n");
hr = IMoniker_ComposeWith(moniker, moniker2, FALSE, &moniker3); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker3, MKSYS_GENERICCOMPOSITE); IMoniker_Release(moniker3);
@@ -2938,15 +2938,15 @@ static void test_anti_moniker(void)
/* Load with composed number > 1. */ hr = CreateAntiMoniker(&moniker2); - ok(hr == S_OK, "Failed to create moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create moniker, hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
stream_write_dword(stream, 2);
hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_moniker("anti moniker 2", moniker, expected_anti_moniker_marshal_data2, sizeof(expected_anti_moniker_marshal_data2), @@ -2955,14 +2955,14 @@ static void test_anti_moniker(void) 20, L"\..\..");
hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker2, moniker); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Hash(moniker, &hash); - ok(hr == S_OK, "Failed to get hash value, hr %#x.\n", hr); - ok(hash == 0x80000002, "Unexpected hash value %#x.\n", hash); + ok(hr == S_OK, "Failed to get hash value, hr %#lx.\n", hr); + ok(hash == 0x80000002, "Unexpected hash value %#lx.\n", hash);
/* Display name reflects anti combination. */ TEST_DISPLAY_NAME(moniker, L"\..\.."); @@ -2971,36 +2971,36 @@ static void test_anti_moniker(void) stream_write_dword(stream, 0xfffff);
hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Hash(moniker, &hash); - ok(hr == S_OK, "Failed to get hash value, hr %#x.\n", hr); - ok(hash == 0x800fffff, "Unexpected hash value %#x.\n", hash); + ok(hr == S_OK, "Failed to get hash value, hr %#lx.\n", hr); + ok(hash == 0x800fffff, "Unexpected hash value %#lx.\n", hash);
stream_write_dword(stream, 0xfffff + 1);
hr = IMoniker_Load(moniker, stream); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Hash(moniker, &hash); - ok(hr == S_OK, "Failed to get hash value, hr %#x.\n", hr); - ok(hash == 0x800fffff, "Unexpected hash value %#x.\n", hash); + ok(hr == S_OK, "Failed to get hash value, hr %#lx.\n", hr); + ok(hash == 0x800fffff, "Unexpected hash value %#lx.\n", hash);
/* Zero combining counter is also valid. */ stream_write_dword(stream, 0);
hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker2, moniker); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Hash(moniker, &hash); - ok(hr == S_OK, "Failed to get hash value, hr %#x.\n", hr); - ok(hash == 0x80000000, "Unexpected hash value %#x.\n", hash); + ok(hr == S_OK, "Failed to get hash value, hr %#lx.\n", hr); + ok(hash == 0x80000000, "Unexpected hash value %#lx.\n", hash);
TEST_DISPLAY_NAME(moniker, L"");
@@ -3008,98 +3008,98 @@ static void test_anti_moniker(void) stream_write_dword(stream, 1);
hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker2, moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Reduce() */ hr = IMoniker_Reduce(moniker, NULL, MKRREDUCE_ALL, NULL, &reduced); - ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#lx.\n", hr); ok(reduced == moniker, "Unexpected moniker.\n"); IMoniker_Release(reduced);
/* Enum() */ enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker, TRUE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!enummoniker, "Unexpected pointer.\n");
enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker, FALSE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!enummoniker, "Unexpected pointer.\n");
hr = IMoniker_Enum(moniker, FALSE, NULL); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* CommonPrefixWith() */ stream_write_dword(stream, 0);
hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3); - ok(hr == MK_S_ME, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_ME, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker, "Unexpected prefix moniker.\n"); IMoniker_Release(moniker3);
hr = IMoniker_CommonPrefixWith(moniker2, moniker, &moniker3); - ok(hr == MK_S_HIM, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_HIM, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker, "Unexpected prefix moniker.\n"); IMoniker_Release(moniker3);
stream_write_dword(stream, 10);
hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream_write_dword(stream, 5);
hr = IMoniker_Load(moniker2, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3); - ok(hr == MK_S_HIM, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_HIM, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker2, "Unexpected prefix moniker.\n"); IMoniker_Release(moniker3);
hr = IMoniker_CommonPrefixWith(moniker2, moniker, &moniker3); - ok(hr == MK_S_ME, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_ME, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker2, "Unexpected prefix moniker.\n"); IMoniker_Release(moniker3);
/* Now same length, 0 or 2 */ stream_write_dword(stream, 0); hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream_write_dword(stream, 0); hr = IMoniker_Load(moniker2, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3); - ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_US, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker, "Unexpected prefix moniker.\n"); IMoniker_Release(moniker3);
stream_write_dword(stream, 2); hr = IMoniker_Load(moniker, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream_write_dword(stream, 2); hr = IMoniker_Load(moniker2, stream); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3); - ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_US, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker, "Unexpected prefix moniker.\n"); IMoniker_Release(moniker3);
@@ -3111,26 +3111,26 @@ static void test_anti_moniker(void) /* RelativePathTo() */ moniker = create_antimoniker(1); hr = create_moniker_from_desc("I1", &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_RelativePathTo(moniker, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_RelativePathTo(moniker, NULL, &moniker3); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_RelativePathTo(moniker, moniker2, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_RelativePathTo(moniker, moniker2, &moniker3); - ok(hr == MK_S_HIM, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_HIM, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker2, "Unexpected object.\n"); IMoniker_Release(moniker3); IMoniker_Release(moniker2);
moniker2 = create_antimoniker(2); hr = IMoniker_RelativePathTo(moniker, moniker2, &moniker3); - ok(hr == MK_S_HIM, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_HIM, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker2, "Unexpected object.\n"); IMoniker_Release(moniker3); hr = IMoniker_RelativePathTo(moniker2, moniker, &moniker3); - ok(hr == MK_S_HIM, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_HIM, "Unexpected hr %#lx.\n", hr); ok(moniker3 == moniker, "Unexpected object.\n"); IMoniker_Release(moniker3);
@@ -3178,7 +3178,7 @@ static void test_generic_composite_moniker(void) ULONG len;
hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "Failed to create bind context, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create bind context, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(simplify_tests); ++i) { @@ -3189,20 +3189,20 @@ static void test_generic_composite_moniker(void) winetest_push_context("simplify[%u]", i);
hr = create_moniker_from_desc(simplify_tests[i].left, &left); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = create_moniker_from_desc(simplify_tests[i].right, &right); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = CreateGenericComposite(left, right, &composite); - ok(hr == S_OK, "Failed to create a composite, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a composite, hr %#lx.\n", hr);
if (composite) { hr = IMoniker_IsSystemMoniker(composite, &moniker_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(moniker_type == simplify_tests[i].result_type, "Unexpected result type %u.\n", moniker_type); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(moniker_type == simplify_tests[i].result_type, "Unexpected result type %lu.\n", moniker_type);
hr = IMoniker_GetDisplayName(composite, bindctx, NULL, &name); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!lstrcmpW(name, simplify_tests[i].name), "Unexpected result name %s.\n", wine_dbgstr_w(name)); CoTaskMemFree(name);
@@ -3218,11 +3218,11 @@ static void test_generic_composite_moniker(void) }
hr = CreateItemMoniker(L"!", L"Test", &moniker1); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr); hr = CreateItemMoniker(L"#", L"Wine", &moniker2); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr); hr = CreateGenericComposite(moniker1, moniker2, &moniker); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
check_interface(moniker, &IID_IMoniker, TRUE); todo_wine @@ -3232,13 +3232,13 @@ static void test_generic_composite_moniker(void) check_interface(moniker, &IID_IMarshal, TRUE);
hr = CreateGenericComposite(moniker1, moniker2, &moniker); - ok(hr == S_OK, "Failed to create composite, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create composite, hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker, MKSYS_GENERICCOMPOSITE);
/* Generic composite is special, as it does not addref in this case. */ hr = IMoniker_QueryInterface(moniker, &CLSID_CompositeMoniker, (void **)&unknown); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) ok(unknown == (IUnknown *)moniker, "Unexpected interface.\n");
@@ -3254,7 +3254,7 @@ static void test_generic_composite_moniker(void) ok_ole_success(hr, IMoniker_Hash);
ok(hash == 0xd87, - "Hash value != 0xd87, instead was 0x%08x\n", + "Hash value != 0xd87, instead was 0x%08lx\n", hash);
/* IsSystemMoniker test */ @@ -3265,88 +3265,88 @@ static void test_generic_composite_moniker(void)
/* IsRunning test */ hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "IMoniker_IsRunning should return E_INVALIDARG, not 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IMoniker_IsRunning should return E_INVALIDARG, not 0x%08lx\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, NULL, moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsRunning(moniker, bindctx, moniker1, moniker); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsRunning(moniker, NULL, moniker1, moniker); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == MK_E_NOTBINDABLE, "IMoniker_GetTimeOfLastChange should return MK_E_NOTBINDABLE, not 0x%08x\n", hr); + ok(hr == MK_E_NOTBINDABLE, "IMoniker_GetTimeOfLastChange should return MK_E_NOTBINDABLE, not 0x%08lx\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08lx\n", hr);
hr = IMoniker_Inverse(moniker, &inverse); - ok(hr == S_OK, "Failed to get inverse, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get inverse, hr %#lx.\n", hr); TEST_MONIKER_TYPE(inverse, MKSYS_GENERICCOMPOSITE); IMoniker_Release(inverse);
/* BindToObject() */ hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IBindCtx_GetRunningObjectTable(bindctx, &rot); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IRunningObjectTable_Register(rot, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown *)moniker, moniker, &cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unknown);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IMoniker, (void **)&unknown); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unknown);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IDispatch, (void **)&unknown); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IRunningObjectTable_Revoke(rot, cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker);
/* BindToObject() with moniker at left */ hr = CreatePointerMoniker((IUnknown *)rot, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* (I1,P) */ hr = create_moniker_from_desc("I1", &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateGenericComposite(moniker2, moniker, &moniker3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_BindToObject(moniker3, bindctx, moniker2, &IID_IMoniker, (void **)&unknown); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
/* Register (I1,I1,P), check if ROT is used for left != NULL case */ hr = CreateGenericComposite(moniker2, moniker3, &moniker4); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
cookie = 0; hr = IRunningObjectTable_Register(rot, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown *)moniker4, moniker4, &cookie); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_BindToObject(moniker3, bindctx, moniker2, &IID_IMoniker, (void **)&unknown); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IRunningObjectTable_Revoke(rot, cookie); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker3); IMoniker_Release(moniker2); @@ -3356,77 +3356,77 @@ static void test_generic_composite_moniker(void)
/* Uninitialized composite */ hr = CoCreateInstance(&CLSID_CompositeMoniker, NULL, CLSCTX_SERVER, &IID_IMoniker, (void **)&moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr); /* Exact error is E_OUTOFMEMORY */ hr = IMoniker_Save(moniker, stream, TRUE); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr); IStream_Release(stream);
hash = 0xdeadbeef; hr = IMoniker_Hash(moniker, &hash); - ok(hr == E_UNEXPECTED, "Unexpected hr %#x.\n", hr); - ok(hash == 0xdeadbeef, "Unexpected hash %#x.\n", hash); + ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr); + ok(hash == 0xdeadbeef, "Unexpected hash %#lx.\n", hash);
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, &str); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rotdata); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IROTData_GetComparisonData(rotdata, NULL, 0, &len); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr); IROTData_Release(rotdata);
hr = IMoniker_QueryInterface(moniker, &IID_IMarshal, (void **)&marshal); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMarshal_GetMarshalSizeMax(marshal, &IID_IMoniker, NULL, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL, &len); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr); hr = IMarshal_MarshalInterface(marshal, stream, &IID_IMoniker, NULL, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr); IMarshal_Release(marshal);
IMoniker_Release(moniker);
/* GetTimeOfLastChange() */ hr = create_moniker_from_desc("CI1I2", &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = create_moniker_from_desc("I1", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* See if non-generic composition is possible */ hr = IMoniker_ComposeWith(moniker1, moniker, TRUE, &moniker2); - ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#lx.\n", hr);
hr = IBindCtx_GetRunningObjectTable(bindctx, &rot); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, moniker1, &ft); - ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &ft); - ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, NULL, NULL, &ft); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IRunningObjectTable_Register(rot, ROTFLAGS_REGISTRATIONKEEPSALIVE, (IUnknown *)moniker, moniker, &cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &ft); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, moniker1, &ft); - ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#lx.\n", hr);
hr = IRunningObjectTable_Revoke(rot, cookie); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IRunningObjectTable_Release(rot);
@@ -3435,53 +3435,53 @@ static void test_generic_composite_moniker(void)
/* CommonPrefixWith() */ hr = create_moniker_from_desc("CI1I2", &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = create_moniker_from_desc("CI1I2", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker1, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
moniker2 = (void *)0xdeadbeef; hr = IMoniker_CommonPrefixWith(moniker, NULL, &moniker2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n");
/* With itself */ hr = IMoniker_CommonPrefixWith(moniker, moniker, &moniker2); - ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_US, "Unexpected hr %#lx.\n", hr); hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_OK && moniker2 != moniker, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK && moniker2 != moniker, "Unexpected hr %#lx.\n", hr); IMoniker_Release(moniker2);
/* Equal composites */ hr = IMoniker_CommonPrefixWith(moniker, moniker1, &moniker2); - ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_US, "Unexpected hr %#lx.\n", hr); ok(moniker2 != moniker && moniker2 != moniker1, "Unexpected object.\n"); hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMoniker_Release(moniker2);
hr = create_moniker_from_desc("I2", &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr); IMoniker_Release(moniker2);
hr = create_moniker_from_desc("I1", &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_CommonPrefixWith(moniker, moniker2, &moniker3); - ok(hr == MK_S_HIM, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_HIM, "Unexpected hr %#lx.\n", hr); hr = IMoniker_IsEqual(moniker2, moniker3); ok(hr == S_OK && moniker3 != moniker2, "Unexpected object.\n"); IMoniker_Release(moniker3);
hr = IMoniker_CommonPrefixWith(moniker2, moniker, &moniker3); todo_wine - ok(hr == MK_S_ME, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_ME, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { hr = IMoniker_IsEqual(moniker2, moniker3); @@ -3496,31 +3496,31 @@ static void test_generic_composite_moniker(void)
/* IsEqual() */ hr = create_moniker_from_desc("CI1I2", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = create_moniker_from_desc("CI1I2", &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_IsEqual(moniker1, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_IsEqual(moniker1, moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_IsEqual(moniker1, moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMoniker_Release(moniker2); IMoniker_Release(moniker1);
/* ComposeWith() */ hr = create_moniker_from_desc("CI1I2", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = create_moniker_from_desc("I3", &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_ComposeWith(moniker1, NULL, FALSE, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(moniker == moniker1, "Unexpected pointer.\n"); IMoniker_Release(moniker);
hr = IMoniker_ComposeWith(moniker1, NULL, TRUE, &moniker); - ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#lx.\n", hr); ok(!moniker, "Unexpected pointer.\n");
IMoniker_Release(moniker2); @@ -3528,29 +3528,29 @@ static void test_generic_composite_moniker(void)
/* Inverse() */ hr = create_moniker_from_desc("CI1I2", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_Inverse(moniker1, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_Inverse(moniker1, &inverse); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(inverse, MKSYS_GENERICCOMPOSITE); TEST_DISPLAY_NAME(inverse, L"\..\.."); IMoniker_Release(inverse); IMoniker_Release(moniker1);
hr = create_moniker_from_desc("CA1A2", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); inverse = (void *)0xdeadbeef; hr = IMoniker_Inverse(moniker1, &inverse); - ok(hr == MK_E_NOINVERSE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOINVERSE, "Unexpected hr %#lx.\n", hr); ok(!inverse, "Unexpected pointer.\n"); IMoniker_Release(moniker1);
hr = create_moniker_from_desc("CI1A2", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); inverse = (void *)0xdeadbeef; hr = IMoniker_Inverse(moniker1, &inverse); - ok(hr == MK_E_NOINVERSE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOINVERSE, "Unexpected hr %#lx.\n", hr); ok(!inverse, "Unexpected pointer.\n"); IMoniker_Release(moniker1);
@@ -3558,13 +3558,13 @@ static void test_generic_composite_moniker(void) m = create_test_moniker(); m->inverse = "I5"; hr = create_moniker_from_desc("I1", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = CreateGenericComposite(moniker1, &m->IMoniker_iface, &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_GENERICCOMPOSITE); inverse = (void *)0xdeadbeef; hr = IMoniker_Inverse(moniker2, &inverse); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!inverse, "Unexpected pointer.\n"); IMoniker_Release(moniker1);
@@ -3573,9 +3573,9 @@ static void test_generic_composite_moniker(void) m2->inverse = "I4";
hr = CreateGenericComposite(&m2->IMoniker_iface, &m->IMoniker_iface, &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_Inverse(moniker2, &inverse); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(inverse, MKSYS_GENERICCOMPOSITE); TEST_DISPLAY_NAME(inverse, L"!I5!I4"); IMoniker_Release(inverse); @@ -3588,25 +3588,25 @@ static void test_generic_composite_moniker(void)
/* One component does not support it. */ hr = create_moniker_from_desc("CPI1", &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &str); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, &str); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
/* Comparison data, pointer component does not support it. */ hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rotdata); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); len = 0; hr = IROTData_GetComparisonData(rotdata, buffer, sizeof(buffer), &len); todo_wine { - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); - ok(!len, "Unexpected length %u.\n", len); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); + ok(!len, "Unexpected length %lu.\n", len); } IROTData_Release(rotdata);
@@ -3614,17 +3614,17 @@ todo_wine {
/* Reduce() */ hr = create_moniker_from_desc("CI1I2", &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Reduce(moniker, NULL, MKRREDUCE_ALL, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_Reduce(moniker, bindctx, MKRREDUCE_ALL, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_Reduce(moniker, NULL, MKRREDUCE_ALL, NULL, &moniker2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Reduce(moniker, bindctx, MKRREDUCE_ALL, NULL, &moniker2); - ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_REDUCED_TO_SELF, "Unexpected hr %#lx.\n", hr); ok(moniker2 == moniker, "Unexpected object.\n"); IMoniker_Release(moniker2);
@@ -3632,171 +3632,171 @@ todo_wine {
/* Enum() */ hr = create_moniker_from_desc("CI1CI2I3", &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Enum(moniker, FALSE, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Forward direction */ hr = IMoniker_Enum(moniker, TRUE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumMoniker_Next(enummoniker, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
moniker2 = (void *)0xdeadbeef; hr = IEnumMoniker_Next(enummoniker, 0, &moniker2, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n");
len = 1; moniker2 = (void *)0xdeadbeef; hr = IEnumMoniker_Next(enummoniker, 0, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!len, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!len, "Unexpected count %lu.\n", len); ok(!moniker2, "Unexpected pointer.\n");
hr = IEnumMoniker_Skip(enummoniker, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
len = 0; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(len == 1, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(len == 1, "Unexpected count %lu.\n", len); TEST_DISPLAY_NAME(moniker2, L"!I1"); IMoniker_Release(moniker2);
len = 0; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(len == 1, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(len == 1, "Unexpected count %lu.\n", len); TEST_DISPLAY_NAME(moniker2, L"!I2"); IMoniker_Release(moniker2);
len = 0; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(len == 1, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(len == 1, "Unexpected count %lu.\n", len); TEST_DISPLAY_NAME(moniker2, L"!I3"); IMoniker_Release(moniker2);
len = 1; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); - ok(!len, "Unexpected count %u.\n", len); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); + ok(!len, "Unexpected count %lu.\n", len);
hr = IEnumMoniker_Skip(enummoniker, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumMoniker_Skip(enummoniker, 1); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IEnumMoniker_Clone(enummoniker, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
enummoniker2 = (void *)0xdeadbeef; hr = IEnumMoniker_Clone(enummoniker, &enummoniker2); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(!enummoniker2, "Unexpected pointer.\n");
hr = IEnumMoniker_Reset(enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumMoniker_Skip(enummoniker, 2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
len = 0; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(len == 1, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(len == 1, "Unexpected count %lu.\n", len); TEST_DISPLAY_NAME(moniker2, L"!I3"); IMoniker_Release(moniker2);
enummoniker2 = (void *)0xdeadbeef; hr = IEnumMoniker_Clone(enummoniker, &enummoniker2); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(!enummoniker2, "Unexpected pointer.\n");
IEnumMoniker_Release(enummoniker);
/* Backward direction */ hr = IMoniker_Enum(moniker, FALSE, &enummoniker); - ok(hr == S_OK, "Failed to get enumerator, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get enumerator, hr %#lx.\n", hr);
hr = IEnumMoniker_Next(enummoniker, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
moniker2 = (void *)0xdeadbeef; hr = IEnumMoniker_Next(enummoniker, 0, &moniker2, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n");
len = 1; moniker2 = (void *)0xdeadbeef; hr = IEnumMoniker_Next(enummoniker, 0, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!len, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!len, "Unexpected count %lu.\n", len); ok(!moniker2, "Unexpected pointer.\n");
hr = IEnumMoniker_Skip(enummoniker, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
len = 0; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(len == 1, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(len == 1, "Unexpected count %lu.\n", len); TEST_DISPLAY_NAME(moniker2, L"!I3"); IMoniker_Release(moniker2);
len = 0; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(len == 1, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(len == 1, "Unexpected count %lu.\n", len); TEST_DISPLAY_NAME(moniker2, L"!I2"); IMoniker_Release(moniker2);
len = 0; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(len == 1, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(len == 1, "Unexpected count %lu.\n", len); TEST_DISPLAY_NAME(moniker2, L"!I1"); IMoniker_Release(moniker2);
len = 1; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); - ok(!len, "Unexpected count %u.\n", len); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); + ok(!len, "Unexpected count %lu.\n", len);
hr = IEnumMoniker_Skip(enummoniker, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumMoniker_Skip(enummoniker, 1); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IEnumMoniker_Clone(enummoniker, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
enummoniker2 = (void *)0xdeadbeef; hr = IEnumMoniker_Clone(enummoniker, &enummoniker2); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(!enummoniker2, "Unexpected pointer.\n");
hr = IEnumMoniker_Reset(enummoniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumMoniker_Skip(enummoniker, 2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
len = 0; hr = IEnumMoniker_Next(enummoniker, 1, &moniker2, &len); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(len == 1, "Unexpected count %u.\n", len); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(len == 1, "Unexpected count %lu.\n", len); TEST_DISPLAY_NAME(moniker2, L"!I1"); IMoniker_Release(moniker2);
enummoniker2 = (void *)0xdeadbeef; hr = IEnumMoniker_Clone(enummoniker, &enummoniker2); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(!enummoniker2, "Unexpected pointer.\n");
IEnumMoniker_Release(enummoniker); @@ -3805,15 +3805,15 @@ todo_wine {
/* RelativePathTo() */ hr = create_moniker_from_desc("CI1I2", &moniker1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = create_moniker_from_desc("CI2I3", &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_RelativePathTo(moniker1, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMoniker_RelativePathTo(moniker1, moniker2, &moniker3); - ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOTBINDABLE, "Unexpected hr %#lx.\n", hr);
IBindCtx_Release(bindctx); } @@ -3837,10 +3837,10 @@ static void test_pointer_moniker(void) test_factory_init(&factory);
hr = CreatePointerMoniker((IUnknown *)&factory.IClassFactory_iface, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CreatePointerMoniker((IUnknown *)&factory.IClassFactory_iface, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(moniker, &IID_IMoniker, TRUE); todo_wine @@ -3851,42 +3851,42 @@ static void test_pointer_moniker(void) check_interface(moniker, &IID_IROTData, FALSE);
hr = IMoniker_QueryInterface(moniker, &IID_IMoniker, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_QueryInterface(moniker, &CLSID_PointerMoniker, (void **)&unknown); ok(unknown == (IUnknown *)moniker, "Unexpected interface.\n"); IUnknown_Release(unknown);
hr = IMoniker_QueryInterface(moniker, &IID_IMarshal, (void **)&marshal); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = IMarshal_GetUnmarshalClass(marshal, NULL, NULL, 0, NULL, 0, &clsid); - ok(hr == S_OK, "Failed to get class, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get class, hr %#lx.\n", hr); ok(IsEqualGUID(&clsid, &CLSID_PointerMoniker), "Unexpected class %s.\n", wine_dbgstr_guid(&clsid));
hr = IMarshal_GetMarshalSizeMax(marshal, &IID_IMoniker, NULL, CLSCTX_INPROC, NULL, 0, &size); - ok(hr == S_OK, "Failed to get marshal size, hr %#x.\n", hr); - ok(size > 0, "Unexpected size %d.\n", size); + ok(hr == S_OK, "Failed to get marshal size, hr %#lx.\n", hr); + ok(size > 0, "Unexpected size %ld.\n", size);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx.\n", hr);
hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == S_OK, "Failed to marshal moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to marshal moniker, hr %#lx.\n", hr);
pos.QuadPart = 0; IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker2); - ok(hr == S_OK, "Failed to unmarshal, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unmarshal, hr %#lx.\n", hr); hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_OK, "Expected equal moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Expected equal moniker, hr %#lx.\n", hr); IMoniker_Release(moniker2);
IStream_Release(stream);
IMarshal_Release(marshal);
- ok(factory.refcount > 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount > 1, "Unexpected factory refcount %lu.\n", factory.refcount);
/* Display Name */
@@ -3894,20 +3894,20 @@ static void test_pointer_moniker(void) ok_ole_success(hr, CreateBindCtx);
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, &display_name); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
display_name = (void *)0xdeadbeef; hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &display_name); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(!display_name, "Unexpected pointer.\n");
IBindCtx_Release(bindctx);
hr = IMoniker_IsDirty(moniker); - ok(hr == S_FALSE, "IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", hr); + ok(hr == S_FALSE, "IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n", hr);
/* Saving */
@@ -3915,20 +3915,20 @@ static void test_pointer_moniker(void) ok_ole_success(hr, CreateStreamOnHGlobal);
hr = IMoniker_Save(moniker, stream, TRUE); - ok(hr == E_NOTIMPL, "IMoniker_Save should have returned E_NOTIMPL instead of 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "IMoniker_Save should have returned E_NOTIMPL instead of 0x%08lx\n", hr);
IStream_Release(stream);
/* Hashing */ hr = IMoniker_Hash(moniker, &hash); ok_ole_success(hr, IMoniker_Hash); - ok(hash == PtrToUlong(&factory.IClassFactory_iface), "Unexpected hash value %#x.\n", hash); + ok(hash == PtrToUlong(&factory.IClassFactory_iface), "Unexpected hash value %#lx.\n", hash);
/* IsSystemMoniker test */ TEST_MONIKER_TYPE(moniker, MKSYS_POINTERMONIKER);
hr = IMoniker_Inverse(moniker, &inverse); - ok(hr == S_OK, "Failed to get inverse, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get inverse, hr %#lx.\n", hr); TEST_MONIKER_TYPE(inverse, MKSYS_ANTIMONIKER); IMoniker_Release(inverse);
@@ -3937,10 +3937,10 @@ static void test_pointer_moniker(void)
/* IsRunning test */ hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == S_OK, "IMoniker_IsRunning should return S_OK, not 0x%08x\n", hr); + ok(hr == S_OK, "IMoniker_IsRunning should return S_OK, not 0x%08lx\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == E_NOTIMPL, "IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08lx\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); ok_ole_success(hr, IMoniker_BindToObject); @@ -3952,62 +3952,62 @@ static void test_pointer_moniker(void)
IMoniker_Release(moniker);
- ok(factory.refcount == 1, "Unexpected factory refcount %u.\n", factory.refcount); + ok(factory.refcount == 1, "Unexpected factory refcount %lu.\n", factory.refcount);
hr = CreatePointerMoniker(NULL, &moniker); ok_ole_success(hr, CreatePointerMoniker);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_UNEXPECTED, "IMoniker_BindToObject should have returned E_UNEXPECTED instead of 0x%08x\n", hr); + ok(hr == E_UNEXPECTED, "IMoniker_BindToObject should have returned E_UNEXPECTED instead of 0x%08lx\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_UNEXPECTED, "IMoniker_BindToStorage should have returned E_UNEXPECTED instead of 0x%08x\n", hr); + ok(hr == E_UNEXPECTED, "IMoniker_BindToStorage should have returned E_UNEXPECTED instead of 0x%08lx\n", hr);
IBindCtx_Release(bindctx);
/* Enum() */ hr = IMoniker_Enum(moniker, TRUE, &enummoniker); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Enum(moniker, FALSE, &enummoniker); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker);
/* CommonPrefixWith() */ hr = CreatePointerMoniker((IUnknown *)&factory.IClassFactory_iface, &moniker); - ok(hr == S_OK, "Failed to create moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create moniker, hr %#lx.\n", hr);
hr = CreatePointerMoniker((IUnknown *)&factory.IClassFactory_iface, &moniker2); - ok(hr == S_OK, "Failed to create moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create moniker, hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, NULL, &prefix); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &prefix); - ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_US, "Unexpected hr %#lx.\n", hr); ok(prefix == moniker, "Unexpected pointer.\n"); IMoniker_Release(prefix);
IMoniker_Release(moniker2);
hr = CreatePointerMoniker((IUnknown *)moniker, &moniker2); - ok(hr == S_OK, "Failed to create moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create moniker, hr %#lx.\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &prefix); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr);
IMoniker_Release(moniker2);
@@ -4016,14 +4016,14 @@ static void test_pointer_moniker(void) /* P + A -> () */ anti = create_antimoniker(1); hr = IMoniker_ComposeWith(moniker, anti, TRUE, &moniker2); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n"); IMoniker_Release(anti);
/* P + A2 -> A */ anti = create_antimoniker(2); hr = IMoniker_ComposeWith(moniker, anti, TRUE, &moniker2); - ok(hr == S_OK, "Failed to compose, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_ANTIMONIKER); IMoniker_Release(moniker2);
@@ -4034,43 +4034,43 @@ static void test_pointer_moniker(void)
/* P + (A,A3) -> A3 */ hr = create_moniker_from_desc("CA1A3", &c); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, TRUE, &moniker2); - ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, FALSE, &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_ANTIMONIKER); hr = IMoniker_Hash(moniker2, &hash); - ok(hr == S_OK, "Failed to get hash, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get hash, hr %#lx.\n", hr); ok(hash == 0x80000003, "Unexpected hash.\n"); IMoniker_Release(moniker2); IMoniker_Release(c);
/* P + (A,I) -> I */ hr = create_moniker_from_desc("CA1I1", &c); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, TRUE, &moniker2); - ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NEEDGENERIC, "Unexpected hr %#lx.\n", hr); hr = IMoniker_ComposeWith(moniker, c, FALSE, &moniker2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker2, MKSYS_ITEMMONIKER); IMoniker_Release(moniker2); IMoniker_Release(c);
/* RelativePathTo() */ hr = create_moniker_from_desc("I1", &moniker3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMoniker_RelativePathTo(moniker, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); moniker2 = (void *)0xdeadbeef; hr = IMoniker_RelativePathTo(moniker, NULL, &moniker2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n"); hr = IMoniker_RelativePathTo(moniker, moniker3, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); moniker2 = (void *)0xdeadbeef; hr = IMoniker_RelativePathTo(moniker, moniker3, &moniker2); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(!moniker2, "Unexpected pointer.\n"); IMoniker_Release(moniker3);
@@ -4097,13 +4097,13 @@ static void test_objref_moniker(void) test_factory_init(&factory);
hr = CreateObjrefMoniker((IUnknown *)&factory.IClassFactory_iface, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx\n", hr);
hr = CreateObjrefMoniker((IUnknown *)&factory.IClassFactory_iface, &moniker); - ok(hr == S_OK, "Unexpected hr %#x\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx\n", hr);
hr = IMoniker_QueryInterface(moniker, &IID_IMoniker, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx\n", hr);
hr = IMoniker_QueryInterface(moniker, &CLSID_PointerMoniker, (void **)&unknown); ok(unknown == (IUnknown *)moniker, "Unexpected interface\n"); @@ -4114,78 +4114,78 @@ static void test_objref_moniker(void) IUnknown_Release(unknown);
hr = IMoniker_QueryInterface(moniker, &IID_IMarshal, (void **)&marshal); - ok(hr == S_OK, "Failed to get interface, hr %#x\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx\n", hr);
hr = IMarshal_GetUnmarshalClass(marshal, NULL, NULL, 0, NULL, 0, &clsid); - ok(hr == S_OK, "Failed to get class, hr %#x\n", hr); + ok(hr == S_OK, "Failed to get class, hr %#lx\n", hr); ok(IsEqualGUID(&clsid, &CLSID_ObjrefMoniker), "Unexpected class %s\n", wine_dbgstr_guid(&clsid));
hr = IMarshal_GetMarshalSizeMax(marshal, &IID_IMoniker, NULL, CLSCTX_INPROC, NULL, 0, &size); - ok(hr == S_OK, "Failed to get marshal size, hr %#x\n", hr); - ok(size > 0, "Unexpected size %d\n", size); + ok(hr == S_OK, "Failed to get marshal size, hr %#lx\n", hr); + ok(size > 0, "Unexpected size %ld\n", size);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Failed to create a stream, hr %#x\n", hr); + ok(hr == S_OK, "Failed to create a stream, hr %#lx\n", hr);
hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == S_OK, "Failed to marshal moniker, hr %#x\n", hr); + ok(hr == S_OK, "Failed to marshal moniker, hr %#lx\n", hr);
pos.QuadPart = 0; IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker2); - ok(hr == S_OK, "Failed to unmarshal, hr %#x\n", hr); + ok(hr == S_OK, "Failed to unmarshal, hr %#lx\n", hr); hr = IMoniker_IsEqual(moniker, moniker2); todo_wine - ok(hr == S_OK, "Expected equal moniker, hr %#x\n", hr); + ok(hr == S_OK, "Expected equal moniker, hr %#lx\n", hr); IMoniker_Release(moniker2);
IStream_Release(stream);
IMarshal_Release(marshal);
- ok(factory.refcount > 1, "Unexpected factory refcount %u\n", factory.refcount); + ok(factory.refcount > 1, "Unexpected factory refcount %lu\n", factory.refcount);
/* Display Name */
hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "CreateBindCtx failed: 0x%08x\n", hr); + ok(hr == S_OK, "CreateBindCtx failed: 0x%08lx\n", hr);
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, &display_name); todo_wine - ok(hr == S_OK, "IMoniker_GetDisplayName failed: 0x%08x\n", hr); + ok(hr == S_OK, "IMoniker_GetDisplayName failed: 0x%08lx\n", hr);
IBindCtx_Release(bindctx);
hr = IMoniker_IsDirty(moniker); - ok(hr == S_FALSE, "IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", hr); + ok(hr == S_FALSE, "IMoniker_IsDirty should return S_FALSE, not 0x%08lx\n", hr);
/* IROTData::GetComparisonData test */
hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rotdata); - ok(hr == E_NOINTERFACE, "IMoniker_QueryInterface(IID_IROTData) should have returned E_NOINTERFACE instead of 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "IMoniker_QueryInterface(IID_IROTData) should have returned E_NOINTERFACE instead of 0x%08lx\n", hr);
/* Saving */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "CreateStreamOnHGlobal failed: 0x%08x\n", hr); + ok(hr == S_OK, "CreateStreamOnHGlobal failed: 0x%08lx\n", hr);
hr = IMoniker_Save(moniker, stream, TRUE); todo_wine - ok(hr == S_OK, "IMoniker_Save failed: 0x%08x\n", hr); + ok(hr == S_OK, "IMoniker_Save failed: 0x%08lx\n", hr);
IStream_Release(stream);
/* Hashing */ hr = IMoniker_Hash(moniker, &hash); - ok(hr == S_OK, "IMoniker_Hash failed: 0x%08x\n", hr); - ok(hash == PtrToUlong(&factory.IClassFactory_iface), "Unexpected hash value %#x\n", hash); + ok(hr == S_OK, "IMoniker_Hash failed: 0x%08lx\n", hr); + ok(hash == PtrToUlong(&factory.IClassFactory_iface), "Unexpected hash value %#lx\n", hash);
/* IsSystemMoniker test */ TEST_MONIKER_TYPE(moniker, MKSYS_OBJREFMONIKER);
hr = IMoniker_Inverse(moniker, &inverse); todo_wine - ok(hr == S_OK, "Failed to get inverse, hr %#x\n", hr); + ok(hr == S_OK, "Failed to get inverse, hr %#lx\n", hr); if (hr == S_OK) { TEST_MONIKER_TYPE(inverse, MKSYS_ANTIMONIKER); @@ -4193,85 +4193,85 @@ if (hr == S_OK) }
hr = CreateBindCtx(0, &bindctx); - ok(hr == S_OK, "CreateBindCtx failed: 0x%08x\n", hr); + ok(hr == S_OK, "CreateBindCtx failed: 0x%08lx\n", hr);
/* IsRunning test */ hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); todo_wine - ok(hr == S_OK, "IMoniker_IsRunning should return S_OK, not 0x%08x\n", hr); + ok(hr == S_OK, "IMoniker_IsRunning should return S_OK, not 0x%08lx\n", hr);
hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == MK_E_UNAVAILABLE, "IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08x\n", hr); + ok(hr == MK_E_UNAVAILABLE, "IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08lx\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); todo_wine - ok(hr == S_OK, "IMoniker_BindToObject failed: 0x%08x\n", hr); + ok(hr == S_OK, "IMoniker_BindToObject failed: 0x%08lx\n", hr); if (hr == S_OK) IUnknown_Release(unknown);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); todo_wine - ok(hr == S_OK, "IMoniker_BindToObject failed: 0x%08x\n", hr); + ok(hr == S_OK, "IMoniker_BindToObject failed: 0x%08lx\n", hr); if (hr == S_OK) IUnknown_Release(unknown);
IMoniker_Release(moniker);
todo_wine - ok(factory.refcount > 1, "Unexpected factory refcount %u\n", factory.refcount); + ok(factory.refcount > 1, "Unexpected factory refcount %lu\n", factory.refcount);
hr = CreateObjrefMoniker(NULL, &moniker); - ok(hr == S_OK, "CreateObjrefMoniker failed, hr %#x\n", hr); + ok(hr == S_OK, "CreateObjrefMoniker failed, hr %#lx\n", hr);
hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); todo_wine - ok(hr == E_UNEXPECTED, "IMoniker_BindToObject should have returned E_UNEXPECTED instead of 0x%08x\n", hr); + ok(hr == E_UNEXPECTED, "IMoniker_BindToObject should have returned E_UNEXPECTED instead of 0x%08lx\n", hr);
hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); todo_wine - ok(hr == E_UNEXPECTED, "IMoniker_BindToStorage should have returned E_UNEXPECTED instead of 0x%08x\n", hr); + ok(hr == E_UNEXPECTED, "IMoniker_BindToStorage should have returned E_UNEXPECTED instead of 0x%08lx\n", hr);
IBindCtx_Release(bindctx);
/* Enum() */ enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker, TRUE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx\n", hr); ok(enummoniker == NULL, "got %p\n", enummoniker);
enummoniker = (void *)0xdeadbeef; hr = IMoniker_Enum(moniker, FALSE, &enummoniker); - ok(hr == S_OK, "Unexpected hr %#x\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx\n", hr); ok(enummoniker == NULL, "got %p\n", enummoniker);
IMoniker_Release(moniker);
/* CommonPrefixWith() */ hr = CreateObjrefMoniker((IUnknown *)&factory.IClassFactory_iface, &moniker); - ok(hr == S_OK, "CreateObjrefMoniker failed: hr %#x\n", hr); + ok(hr == S_OK, "CreateObjrefMoniker failed: hr %#lx\n", hr);
hr = CreateObjrefMoniker((IUnknown *)&factory.IClassFactory_iface, &moniker2); - ok(hr == S_OK, "CreateObjrefMoniker failed: hr %#x\n", hr); + ok(hr == S_OK, "CreateObjrefMoniker failed: hr %#lx\n", hr);
hr = IMoniker_IsEqual(moniker, NULL); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2); todo_wine - ok(hr == S_OK, "Unexpected hr %#x\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, NULL); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, NULL, &prefix); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &prefix); todo_wine - ok(hr == MK_S_US, "Unexpected hr %#x\n", hr); + ok(hr == MK_S_US, "Unexpected hr %#lx\n", hr); if (hr == S_OK) { ok(prefix == moniker, "Unexpected pointer\n"); @@ -4281,15 +4281,15 @@ if (hr == S_OK) IMoniker_Release(moniker2);
hr = CreateObjrefMoniker((IUnknown *)moniker, &moniker2); - ok(hr == S_OK, "Failed to create moniker, hr %#x\n", hr); + ok(hr == S_OK, "Failed to create moniker, hr %#lx\n", hr);
hr = IMoniker_IsEqual(moniker, moniker2); todo_wine - ok(hr == S_FALSE, "Unexpected hr %#x\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx\n", hr);
hr = IMoniker_CommonPrefixWith(moniker, moniker2, &prefix); todo_wine - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx\n", hr);
IMoniker_Release(moniker2);
@@ -4299,7 +4299,7 @@ if (hr == S_OK) anti = create_antimoniker(1); hr = IMoniker_ComposeWith(moniker, anti, TRUE, &moniker2); todo_wine - ok(hr == S_OK, "Failed to compose, hr %#x\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx\n", hr); if (hr == S_OK) ok(!moniker2, "Unexpected pointer\n"); IMoniker_Release(anti); @@ -4308,7 +4308,7 @@ if (hr == S_OK) anti = create_antimoniker(2); hr = IMoniker_ComposeWith(moniker, anti, TRUE, &moniker2); todo_wine - ok(hr == S_OK, "Failed to compose, hr %#x\n", hr); + ok(hr == S_OK, "Failed to compose, hr %#lx\n", hr); if (hr == S_OK) { TEST_MONIKER_TYPE(moniker2, MKSYS_ANTIMONIKER); @@ -4335,22 +4335,22 @@ static void test_bind_context(void) static const WCHAR wszNonExistent[] = {'N','o','n','E','x','i','s','t','e','n','t',0};
hr = CreateBindCtx(0, NULL); - ok(hr == E_INVALIDARG, "CreateBindCtx with NULL ppbc should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CreateBindCtx with NULL ppbc should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = CreateBindCtx(0xdeadbeef, &pBindCtx); - ok(hr == E_INVALIDARG, "CreateBindCtx with reserved value non-zero should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "CreateBindCtx with reserved value non-zero should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = CreateBindCtx(0, &pBindCtx); ok_ole_success(hr, "CreateBindCtx");
hr = IBindCtx_GetRunningObjectTable(pBindCtx, NULL); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = IBindCtx_GetRunningObjectTable(pBindCtx, &rot); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = GetRunningObjectTable(0, &rot2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rot == rot2, "Unexpected ROT instance.\n"); IRunningObjectTable_Release(rot); IRunningObjectTable_Release(rot2); @@ -4359,36 +4359,36 @@ static void test_bind_context(void) hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); ok_ole_success(hr, "IBindCtx_GetBindOptions"); ok(bind_opts.cbStruct == sizeof(BIND_OPTS3) || broken(bind_opts.cbStruct == sizeof(BIND_OPTS2)) /* XP */, - "Unexpected bind_opts.cbStruct %d.\n", bind_opts.cbStruct); + "Unexpected bind_opts.cbStruct %ld.\n", bind_opts.cbStruct);
bind_opts.cbStruct = sizeof(BIND_OPTS); hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); ok_ole_success(hr, "IBindCtx_GetBindOptions"); - ok(bind_opts.cbStruct == sizeof(BIND_OPTS), "bind_opts.cbStruct was %d\n", bind_opts.cbStruct); + ok(bind_opts.cbStruct == sizeof(BIND_OPTS), "bind_opts.cbStruct was %ld\n", bind_opts.cbStruct);
memset(&bind_opts, 0xfe, sizeof(bind_opts)); bind_opts.cbStruct = sizeof(bind_opts); hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); ok_ole_success(hr, "IBindCtx_GetBindOptions"); ok(bind_opts.cbStruct == sizeof(bind_opts) || bind_opts.cbStruct == sizeof(BIND_OPTS2) /* XP */, - "Unexpected bind_opts.cbStruct %d.\n", bind_opts.cbStruct); - ok(bind_opts.grfFlags == 0, "bind_opts.grfFlags was 0x%x instead of 0\n", bind_opts.grfFlags); - ok(bind_opts.grfMode == STGM_READWRITE, "bind_opts.grfMode was 0x%x instead of STGM_READWRITE\n", bind_opts.grfMode); - ok(bind_opts.dwTickCountDeadline == 0, "bind_opts.dwTickCountDeadline was %d instead of 0\n", bind_opts.dwTickCountDeadline); - ok(bind_opts.dwTrackFlags == 0, "bind_opts.dwTrackFlags was 0x%x instead of 0\n", bind_opts.dwTrackFlags); + "Unexpected bind_opts.cbStruct %ld.\n", bind_opts.cbStruct); + ok(bind_opts.grfFlags == 0, "bind_opts.grfFlags was 0x%lx instead of 0\n", bind_opts.grfFlags); + ok(bind_opts.grfMode == STGM_READWRITE, "bind_opts.grfMode was 0x%lx instead of STGM_READWRITE\n", bind_opts.grfMode); + ok(bind_opts.dwTickCountDeadline == 0, "bind_opts.dwTickCountDeadline was %ld instead of 0\n", bind_opts.dwTickCountDeadline); + ok(bind_opts.dwTrackFlags == 0, "bind_opts.dwTrackFlags was 0x%lx instead of 0\n", bind_opts.dwTrackFlags); ok(bind_opts.dwClassContext == (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER), - "bind_opts.dwClassContext should have been 0x15 instead of 0x%x\n", bind_opts.dwClassContext); - ok(bind_opts.locale == GetThreadLocale(), "bind_opts.locale should have been 0x%x instead of 0x%x\n", GetThreadLocale(), bind_opts.locale); + "bind_opts.dwClassContext should have been 0x15 instead of 0x%lx\n", bind_opts.dwClassContext); + ok(bind_opts.locale == GetThreadLocale(), "bind_opts.locale should have been 0x%lx instead of 0x%lx\n", GetThreadLocale(), bind_opts.locale); ok(bind_opts.pServerInfo == NULL, "bind_opts.pServerInfo should have been NULL instead of %p\n", bind_opts.pServerInfo); if (bind_opts.cbStruct >= sizeof(BIND_OPTS3)) ok(bind_opts.hwnd == NULL, "Unexpected bind_opts.hwnd %p.\n", bind_opts.hwnd);
bind_opts.cbStruct = -1; hr = IBindCtx_SetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); - ok(hr == E_INVALIDARG, "IBindCtx_SetBindOptions with bad cbStruct should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IBindCtx_SetBindOptions with bad cbStruct should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = IBindCtx_RegisterObjectParam(pBindCtx, (WCHAR *)wszParamName, NULL); - ok(hr == E_INVALIDARG, "IBindCtx_RegisterObjectParam should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IBindCtx_RegisterObjectParam should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
unknown = HeapAlloc(GetProcessHeap(), 0, sizeof(*unknown)); unknown->IUnknown_iface.lpVtbl = &HeapUnknown_Vtbl; @@ -4401,21 +4401,21 @@ static void test_bind_context(void) IUnknown_Release(param_obj);
hr = IBindCtx_GetObjectParam(pBindCtx, (WCHAR *)wszNonExistent, ¶m_obj); - ok(hr == E_FAIL, "IBindCtx_GetObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08x\n", hr); + ok(hr == E_FAIL, "IBindCtx_GetObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08lx\n", hr); ok(param_obj == NULL, "IBindCtx_GetObjectParam with nonexistent key should have set output parameter to NULL instead of %p\n", param_obj);
hr = IBindCtx_RevokeObjectParam(pBindCtx, (WCHAR *)wszNonExistent); - ok(hr == E_FAIL, "IBindCtx_RevokeObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08x\n", hr); + ok(hr == E_FAIL, "IBindCtx_RevokeObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08lx\n", hr);
hr = IBindCtx_EnumObjectParam(pBindCtx, &pEnumString); - ok(hr == E_NOTIMPL, "IBindCtx_EnumObjectParam should have returned E_NOTIMPL instead of 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "IBindCtx_EnumObjectParam should have returned E_NOTIMPL instead of 0x%08lx\n", hr); ok(!pEnumString, "pEnumString should be NULL\n");
hr = IBindCtx_RegisterObjectBound(pBindCtx, NULL); ok_ole_success(hr, "IBindCtx_RegisterObjectBound(NULL)");
hr = IBindCtx_RevokeObjectBound(pBindCtx, NULL); - ok(hr == E_INVALIDARG, "IBindCtx_RevokeObjectBound(NULL) should have return E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IBindCtx_RevokeObjectBound(NULL) should have return E_INVALIDARG instead of 0x%08lx\n", hr);
unknown2 = HeapAlloc(GetProcessHeap(), 0, sizeof(*unknown)); unknown2->IUnknown_iface.lpVtbl = &HeapUnknown_Vtbl; @@ -4427,15 +4427,15 @@ static void test_bind_context(void) ok_ole_success(hr, "IBindCtx_RevokeObjectBound");
hr = IBindCtx_RevokeObjectBound(pBindCtx, &unknown2->IUnknown_iface); - ok(hr == MK_E_NOTBOUND, "IBindCtx_RevokeObjectBound with not bound object should have returned MK_E_NOTBOUND instead of 0x%08x\n", hr); + ok(hr == MK_E_NOTBOUND, "IBindCtx_RevokeObjectBound with not bound object should have returned MK_E_NOTBOUND instead of 0x%08lx\n", hr);
IBindCtx_Release(pBindCtx);
refs = IUnknown_Release(&unknown->IUnknown_iface); - ok(!refs, "object param should have been destroyed, instead of having %d refs\n", refs); + ok(!refs, "object param should have been destroyed, instead of having %ld refs\n", refs);
refs = IUnknown_Release(&unknown2->IUnknown_iface); - ok(!refs, "bound object should have been destroyed, instead of having %d refs\n", refs); + ok(!refs, "bound object should have been destroyed, instead of having %ld refs\n", refs); }
static void test_save_load_filemoniker(void) @@ -4510,83 +4510,83 @@ static void test_MonikerCommonPrefixWith(void) moniker = (void *)0xdeadbeef; hr = MonikerCommonPrefixWith(NULL, NULL, &moniker); todo_wine { - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr); ok(!moniker, "Unexpected pointer.\n"); } if (hr == E_NOTIMPL) return;
hr = CreateItemMoniker(L"!", L"Item", &item); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
moniker = (void *)0xdeadbeef; hr = MonikerCommonPrefixWith(item, NULL, &moniker); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr); ok(!moniker, "Unexpected pointer.\n");
moniker = (void *)0xdeadbeef; hr = MonikerCommonPrefixWith(NULL, item, &moniker); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr); ok(!moniker, "Unexpected pointer.\n");
hr = MonikerCommonPrefixWith(item, item, &moniker); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr);
hr = CreateFileMoniker(L"C:\test.txt", &file1); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
hr = MonikerCommonPrefixWith(file1, NULL, &moniker); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr);
hr = MonikerCommonPrefixWith(NULL, file1, &moniker); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr);
/* F x F */ hr = MonikerCommonPrefixWith(file1, file1, &moniker); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr);
hr = CreateFileMoniker(L"C:\a\test.txt", &file2); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
/* F1 x F2 */ hr = MonikerCommonPrefixWith(file1, file2, &moniker); - ok(hr == MK_E_NOPREFIX, "Unexpected hr %#x.\n", hr); + ok(hr == MK_E_NOPREFIX, "Unexpected hr %#lx.\n", hr);
hr = CreateGenericComposite(file1, item, &composite); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
hr = CreateGenericComposite(file2, item, &composite2); - ok(hr == S_OK, "Failed to create a moniker, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a moniker, hr %#lx.\n", hr);
/* F x (F,I) -> F */ hr = MonikerCommonPrefixWith(file1, composite, &moniker); - ok(hr == MK_S_ME, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_ME, "Unexpected hr %#lx.\n", hr); ok(moniker == file1, "Unexpected pointer.\n"); IMoniker_Release(moniker);
/* F1 x (F2,I) -> F */ hr = MonikerCommonPrefixWith(file1, composite2, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker, MKSYS_FILEMONIKER); TEST_DISPLAY_NAME(moniker, L"C:\"); IMoniker_Release(moniker);
/* (F2,I) x F1 -> F */ hr = MonikerCommonPrefixWith(composite2, file1, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker, MKSYS_FILEMONIKER); TEST_DISPLAY_NAME(moniker, L"C:\"); IMoniker_Release(moniker);
/* (F,I) x (F) -> F */ hr = MonikerCommonPrefixWith(composite, file1, &moniker); - ok(hr == MK_S_HIM, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_HIM, "Unexpected hr %#lx.\n", hr); ok(moniker == file1, "Unexpected pointer.\n"); IMoniker_Release(moniker);
/* (F,I) x (F,I) -> (F,I) */ hr = MonikerCommonPrefixWith(composite, composite, &moniker); - ok(hr == MK_S_US, "Unexpected hr %#x.\n", hr); + ok(hr == MK_S_US, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker, MKSYS_GENERICCOMPOSITE); TEST_DISPLAY_NAME(moniker, L"C:\test.txt!Item"); ok(moniker != composite, "Unexpected pointer.\n"); @@ -4594,7 +4594,7 @@ todo_wine {
/* (F1,I) x (F2,I) -> () */ hr = MonikerCommonPrefixWith(composite, composite2, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!moniker, "Unexpected pointer %p.\n", moniker);
IMoniker_Release(composite2); @@ -4602,11 +4602,11 @@ todo_wine {
/* (I1,(I2,I3)) x ((I1,I2),I4) */ hr = create_moniker_from_desc("CI1CI2I3", &composite); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = create_moniker_from_desc("CCI1I2I4", &composite2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = MonikerCommonPrefixWith(composite, composite2, &moniker); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); TEST_MONIKER_TYPE(moniker, MKSYS_GENERICCOMPOSITE); TEST_DISPLAY_NAME(moniker, L"!I1!I2"); IMoniker_Release(moniker); diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c index c463e74c8cb..f910fc1427d 100644 --- a/dlls/ole32/tests/ole2.c +++ b/dlls/ole32/tests/ole2.c @@ -33,7 +33,7 @@
#include "wine/test.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
#define DEFINE_EXPECT(func) \ static BOOL expect_ ## func = FALSE, called_ ## func = FALSE @@ -163,11 +163,11 @@ static void inline check_expected_method_fmt(const char *method_name, const FORM { ok(fmt->cfFormat == expected_method_list->fmt.cfFormat, "got cf %04x vs %04x\n", fmt->cfFormat, expected_method_list->fmt.cfFormat ); - ok(fmt->dwAspect == expected_method_list->fmt.dwAspect, "got aspect %d vs %d\n", + ok(fmt->dwAspect == expected_method_list->fmt.dwAspect, "got aspect %ld vs %ld\n", fmt->dwAspect, expected_method_list->fmt.dwAspect ); - ok(fmt->lindex == expected_method_list->fmt.lindex, "got lindex %d vs %d\n", + ok(fmt->lindex == expected_method_list->fmt.lindex, "got lindex %ld vs %ld\n", fmt->lindex, expected_method_list->fmt.lindex ); - ok(fmt->tymed == expected_method_list->fmt.tymed, "got tymed %d vs %d\n", + ok(fmt->tymed == expected_method_list->fmt.tymed, "got tymed %ld vs %ld\n", fmt->tymed, expected_method_list->fmt.tymed ); } } @@ -515,7 +515,7 @@ static HRESULT WINAPI OleObject_GetMiscStatus { CHECK_EXPECTED_METHOD("OleObject_GetMiscStatus");
- ok(aspect == DVASPECT_CONTENT, "got aspect %d\n", aspect); + ok(aspect == DVASPECT_CONTENT, "got aspect %ld\n", aspect);
if (g_GetMiscStatusFailsWith == S_OK) { @@ -697,11 +697,11 @@ static HRESULT WINAPI OleObjectCache_Cache ok((pformatetc->ptd != NULL) == (g_expected_fetc->ptd != NULL), "ptd: %p\n", pformatetc->ptd); ok(pformatetc->dwAspect == g_expected_fetc->dwAspect, - "dwAspect: %x\n", pformatetc->dwAspect); + "dwAspect: %lx\n", pformatetc->dwAspect); ok(pformatetc->lindex == g_expected_fetc->lindex, - "lindex: %x\n", pformatetc->lindex); + "lindex: %lx\n", pformatetc->lindex); ok(pformatetc->tymed == g_expected_fetc->tymed, - "tymed: %x\n", pformatetc->tymed); + "tymed: %lx\n", pformatetc->tymed); } } else ok(pformatetc == NULL, "pformatetc should be NULL\n"); @@ -907,7 +907,7 @@ static HRESULT WINAPI viewobject_Draw(IViewObject *iface, DWORD aspect, LONG ind LPCRECTL bounds, LPCRECTL wbounds, BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue) { - ok(index == -1, "index=%d\n", index); + ok(index == -1, "index=%ld\n", index); return S_OK; }
@@ -1024,21 +1024,21 @@ static void test_OleCreate(IStorage *pStorage) ok_ole_success(hr, "OleCreate"); IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
expected_method_list = methods_olerender_draw; hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_DRAW, NULL, NULL, pStorage, (void **)&pObject); ok_ole_success(hr, "OleCreate"); IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
expected_method_list = methods_olerender_draw_with_site; hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_DRAW, NULL, (IOleClientSite*)0xdeadbeef, pStorage, (void **)&pObject); ok_ole_success(hr, "OleCreate"); IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
/* GetMiscStatus fails */ g_GetMiscStatusFailsWith = 0x8fafefaf; @@ -1047,7 +1047,7 @@ static void test_OleCreate(IStorage *pStorage) ok_ole_success(hr, "OleCreate"); IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount); g_GetMiscStatusFailsWith = S_OK;
formatetc.cfFormat = CF_TEXT; @@ -1059,20 +1059,20 @@ static void test_OleCreate(IStorage *pStorage) hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_FORMAT, &formatetc, (IOleClientSite *)0xdeadbeef, pStorage, (void **)&pObject); ok(hr == S_OK || broken(hr == E_INVALIDARG), /* win2k */ - "OleCreate failed with error 0x%08x\n", hr); + "OleCreate failed with error 0x%08lx\n", hr); if (pObject) { IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); } - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
expected_method_list = methods_olerender_asis; hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_ASIS, NULL, NULL, pStorage, (void **)&pObject); ok_ole_success(hr, "OleCreate"); IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
formatetc.cfFormat = 0; formatetc.tymed = TYMED_NULL; @@ -1090,7 +1090,7 @@ static void test_OleCreate(IStorage *pStorage) ok_ole_success(hr, "OleCreate"); IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount); g_expected_fetc = NULL; }
@@ -1115,18 +1115,18 @@ static void test_OleLoad(IStorage *pStorage) hr = OleLoad(pStorage, &IID_IOleObject, (IOleClientSite *)0xdeadbeef, (void **)&pObject); ok(hr == S_OK || broken(hr == E_INVALIDARG), /* win98 and win2k */ - "OleLoad failed with error 0x%08x\n", hr); + "OleLoad failed with error 0x%08lx\n", hr); if(pObject) { DWORD dwStatus = 0xdeadbeef; hr = IOleObject_GetMiscStatus(pObject, DVASPECT_CONTENT, &dwStatus); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); - ok(dwStatus == 0x1234, "Got 0x%08x\n", dwStatus); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr); + ok(dwStatus == 0x1234, "Got 0x%08lx\n", dwStatus);
IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); } - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount); g_GetMiscStatusFailsWith = S_OK;
/* Test again, let IOleObject_GetMiscStatus succeed. */ @@ -1134,18 +1134,18 @@ static void test_OleLoad(IStorage *pStorage) hr = OleLoad(pStorage, &IID_IOleObject, (IOleClientSite *)0xdeadbeef, (void **)&pObject); ok(hr == S_OK || broken(hr == E_INVALIDARG), /* win98 and win2k */ - "OleLoad failed with error 0x%08x\n", hr); + "OleLoad failed with error 0x%08lx\n", hr); if (pObject) { DWORD dwStatus = 0xdeadbeef; hr = IOleObject_GetMiscStatus(pObject, DVASPECT_CONTENT, &dwStatus); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(dwStatus == 1, "Got 0x%08x\n", dwStatus); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(dwStatus == 1, "Got 0x%08lx\n", dwStatus);
IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); } - ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
for (fmt = CF_TEXT; fmt < CF_MAX; fmt++) { @@ -1163,21 +1163,21 @@ static void test_OleLoad(IStorage *pStorage) for (i = 0; i < 7; i++) { hr = StgCreateDocfile(NULL, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &stg); - ok(hr == S_OK, "StgCreateDocfile error %#x\n", hr); + ok(hr == S_OK, "StgCreateDocfile error %#lx\n", hr);
hr = IStorage_SetClass(stg, &CLSID_WineTest); - ok(hr == S_OK, "SetClass error %#x\n", hr); + ok(hr == S_OK, "SetClass error %#lx\n", hr);
hr = IStorage_CreateStream(stg, olrepres, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, &stream); - ok(hr == S_OK, "CreateStream error %#x\n", hr); + ok(hr == S_OK, "CreateStream error %#lx\n", hr);
data = ~0; hr = IStream_Write(stream, &data, sizeof(data), NULL); - ok(hr == S_OK, "Write error %#x\n", hr); + ok(hr == S_OK, "Write error %#lx\n", hr);
data = fmt; hr = IStream_Write(stream, &data, sizeof(data), NULL); - ok(hr == S_OK, "Write error %#x\n", hr); + ok(hr == S_OK, "Write error %#lx\n", hr);
switch (fmt) { @@ -1211,10 +1211,10 @@ static void test_OleLoad(IStorage *pStorage) header.dwObjectExtentY = 1; header.dwSize = data_size; hr = IStream_Write(stream, &header, sizeof(header), NULL); - ok(hr == S_OK, "Write error %#x\n", hr); + ok(hr == S_OK, "Write error %#lx\n", hr);
hr = IStream_Write(stream, buf, data_size, NULL); - ok(hr == S_OK, "Write error %#x\n", hr); + ok(hr == S_OK, "Write error %#lx\n", hr);
IStream_Release(stream);
@@ -1225,19 +1225,19 @@ static void test_OleLoad(IStorage *pStorage) IStorage_Release(stg); continue; } - ok(hr == S_OK, "OleLoad error %#x: cfFormat = %u, advf = %#x\n", hr, fmt, header.advf); + ok(hr == S_OK, "OleLoad error %#lx: cfFormat = %lu, advf = %#lx\n", hr, fmt, header.advf);
hdc = CreateCompatibleDC(0); SetRect(&rc, 0, 0, 100, 100); hr = OleDraw(obj, DVASPECT_CONTENT, hdc, &rc); DeleteDC(hdc); if (fmt == CF_METAFILEPICT) - ok(hr == S_OK, "OleDraw error %#x: cfFormat = %u, advf = %#x\n", hr, fmt, header.advf); + ok(hr == S_OK, "OleDraw error %#lx: cfFormat = %lu, advf = %#lx\n", hr, fmt, header.advf); else if (fmt == CF_ENHMETAFILE) todo_wine - ok(hr == S_OK, "OleDraw error %#x: cfFormat = %u, advf = %#x\n", hr, fmt, header.advf); + ok(hr == S_OK, "OleDraw error %#lx: cfFormat = %lu, advf = %#lx\n", hr, fmt, header.advf); else - ok(hr == OLE_E_BLANK || hr == OLE_E_NOTRUNNING || hr == E_FAIL, "OleDraw should fail: %#x, cfFormat = %u, advf = %#x\n", hr, fmt, header.advf); + ok(hr == OLE_E_BLANK || hr == OLE_E_NOTRUNNING || hr == E_FAIL, "OleDraw should fail: %#lx, cfFormat = %lu, advf = %#lx\n", hr, fmt, header.advf);
IUnknown_Release(obj); IStorage_Release(stg); @@ -1534,7 +1534,7 @@ static void check_enum_cache(IOleCache2 *cache, const STATDATA *expect, int num) HRESULT hr;
hr = IOleCache2_EnumCache( cache, &enum_stat ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
while (IEnumSTATDATA_Next(enum_stat, 1, &stat, NULL) == S_OK) { @@ -1542,15 +1542,15 @@ static void check_enum_cache(IOleCache2 *cache, const STATDATA *expect, int num) stat.formatetc.cfFormat, expect->formatetc.cfFormat ); ok( !stat.formatetc.ptd == !expect->formatetc.ptd, "got %p expect %p\n", stat.formatetc.ptd, expect->formatetc.ptd ); - ok( stat.formatetc.dwAspect == expect->formatetc.dwAspect, "got %d expect %d\n", + ok( stat.formatetc.dwAspect == expect->formatetc.dwAspect, "got %ld expect %ld\n", stat.formatetc.dwAspect, expect->formatetc.dwAspect ); - ok( stat.formatetc.lindex == expect->formatetc.lindex, "got %d expect %d\n", + ok( stat.formatetc.lindex == expect->formatetc.lindex, "got %ld expect %ld\n", stat.formatetc.lindex, expect->formatetc.lindex ); - ok( stat.formatetc.tymed == expect->formatetc.tymed, "got %d expect %d\n", + ok( stat.formatetc.tymed == expect->formatetc.tymed, "got %ld expect %ld\n", stat.formatetc.tymed, expect->formatetc.tymed ); - ok( stat.advf == expect->advf, "got %d expect %d\n", stat.advf, expect->advf ); + ok( stat.advf == expect->advf, "got %ld expect %ld\n", stat.advf, expect->advf ); ok( stat.pAdvSink == 0, "got %p\n", stat.pAdvSink ); - ok( stat.dwConnection == expect->dwConnection, "got %d expect %d\n", stat.dwConnection, expect->dwConnection ); + ok( stat.dwConnection == expect->dwConnection, "got %ld expect %ld\n", stat.dwConnection, expect->dwConnection ); num--; expect++; } @@ -1632,15 +1632,15 @@ static void test_data_cache(void)
/* requested is not IUnknown */ hr = CreateDataCache(&unknown, &CLSID_NULL, &IID_IOleCache2, (void**)&pOleCache); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = CreateDataCache(&unknown, &CLSID_NULL, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IOleCache, (void**)&olecache); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IUnknown_QueryInterface(unk, &IID_IOleCache2, (void**)&pOleCache); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(unk != (IUnknown*)olecache, "got %p, expected %p\n", olecache, unk); ok(unk != (IUnknown*)pOleCache, "got %p, expected %p\n", pOleCache, unk); IOleCache2_Release(pOleCache); @@ -1648,13 +1648,13 @@ static void test_data_cache(void) IUnknown_Release(unk);
hr = CreateDataCache(NULL, &CLSID_NULL, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IUnknown_QueryInterface(unk, &IID_IOleCache, (void**)&olecache); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IUnknown_QueryInterface(unk, &IID_IOleCache2, (void**)&pOleCache); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void**)&unk2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(unk == (IUnknown*)olecache, "got %p, expected %p\n", olecache, unk); ok(unk == (IUnknown*)pOleCache, "got %p, expected %p\n", pOleCache, unk); ok(unk == unk2, "got %p, expected %p\n", unk2, unk); @@ -1689,16 +1689,16 @@ static void test_data_cache(void) ok(IsEqualCLSID(&clsid, &IID_NULL), "clsid should be blank\n");
hr = IOleCache2_Uncache(pOleCache, 0xdeadbeef); - ok(hr == OLE_E_NOCONNECTION, "IOleCache_Uncache with invalid value should return OLE_E_NOCONNECTION instead of 0x%x\n", hr); + ok(hr == OLE_E_NOCONNECTION, "IOleCache_Uncache with invalid value should return OLE_E_NOCONNECTION instead of 0x%lx\n", hr);
/* Both tests crash on NT4 and below. StgCreatePropSetStg is only available on w2k and above. */ if (GetProcAddress(GetModuleHandleA("ole32.dll"), "StgCreatePropSetStg")) { hr = IOleCache2_Cache(pOleCache, NULL, 0, &dwConnection); - ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL fmtetc should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL fmtetc should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = IOleCache2_Cache(pOleCache, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL pdwConnection should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL pdwConnection should have returned E_INVALIDARG instead of 0x%08lx\n", hr); } else { @@ -1717,15 +1717,15 @@ static void test_data_cache(void) (fmtetc.cfFormat == CF_BITMAP && fmtetc.tymed == TYMED_GDI) || (fmtetc.cfFormat == CF_DIB && fmtetc.tymed == TYMED_HGLOBAL) || (fmtetc.cfFormat == CF_ENHMETAFILE && fmtetc.tymed == TYMED_ENHMF)) - ok(hr == S_OK, "IOleCache_Cache cfFormat = %d, tymed = %d should have returned S_OK instead of 0x%08x\n", + ok(hr == S_OK, "IOleCache_Cache cfFormat = %d, tymed = %ld should have returned S_OK instead of 0x%08lx\n", fmtetc.cfFormat, fmtetc.tymed, hr); else if (fmtetc.tymed == TYMED_HGLOBAL) ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED || broken(hr == S_OK && fmtetc.cfFormat == CF_BITMAP) /* Win9x & NT4 */, - "IOleCache_Cache cfFormat = %d, tymed = %d should have returned CACHE_S_FORMATETC_NOTSUPPORTED instead of 0x%08x\n", + "IOleCache_Cache cfFormat = %d, tymed = %ld should have returned CACHE_S_FORMATETC_NOTSUPPORTED instead of 0x%08lx\n", fmtetc.cfFormat, fmtetc.tymed, hr); else - ok(hr == DV_E_TYMED, "IOleCache_Cache cfFormat = %d, tymed = %d should have returned DV_E_TYMED instead of 0x%08x\n", + ok(hr == DV_E_TYMED, "IOleCache_Cache cfFormat = %d, tymed = %ld should have returned DV_E_TYMED instead of 0x%08lx\n", fmtetc.cfFormat, fmtetc.tymed, hr); if (SUCCEEDED(hr)) { @@ -1758,7 +1758,7 @@ static void test_data_cache(void)
fmtetc.dwAspect = DVASPECT_CONTENT; hr = IOleCache2_SetData(pOleCache, &fmtetc, &stgmedium, FALSE); - ok(hr == OLE_E_BLANK, "IOleCache_SetData for aspect not in cache should have return OLE_E_BLANK instead of 0x%08x\n", hr); + ok(hr == OLE_E_BLANK, "IOleCache_SetData for aspect not in cache should have return OLE_E_BLANK instead of 0x%08lx\n", hr);
fmtetc.dwAspect = DVASPECT_ICON; hr = IOleCache2_SetData(pOleCache, &fmtetc, &stgmedium, FALSE); @@ -1769,7 +1769,7 @@ static void test_data_cache(void) todo_wine { ok_ole_success(hr, "IViewObject_Freeze"); hr = IViewObject_Freeze(pViewObject, DVASPECT_CONTENT, -1, NULL, &dwFreeze); - ok(hr == OLE_E_BLANK, "IViewObject_Freeze with uncached aspect should have returned OLE_E_BLANK instead of 0x%08x\n", hr); + ok(hr == OLE_E_BLANK, "IViewObject_Freeze with uncached aspect should have returned OLE_E_BLANK instead of 0x%08lx\n", hr); }
rcBounds.left = 0; @@ -1782,7 +1782,7 @@ static void test_data_cache(void) ok_ole_success(hr, "IViewObject_Draw");
hr = IViewObject_Draw(pViewObject, DVASPECT_CONTENT, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08x\n", hr); + ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08lx\n", hr);
/* a NULL draw_continue fn ptr */ hr = IViewObject_Draw(pViewObject, DVASPECT_ICON, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, NULL, 0xdeadbeef); @@ -1792,7 +1792,7 @@ static void test_data_cache(void) hr = IViewObject_Draw(pViewObject, DVASPECT_ICON, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue_false, 0xdeadbeef); ok(hr == E_ABORT || broken(hr == S_OK), /* win9x may skip the callbacks */ - "IViewObject_Draw with draw_continue_false returns 0x%08x\n", hr); + "IViewObject_Draw with draw_continue_false returns 0x%08lx\n", hr);
DeleteDC(hdcMem);
@@ -1806,7 +1806,7 @@ static void test_data_cache(void) ok_ole_success(hr, "IPersistStorage_SaveCompleted");
hr = IPersistStorage_IsDirty(pPS); - ok(hr == S_FALSE, "IPersistStorage_IsDirty should have returned S_FALSE instead of 0x%x\n", hr); + ok(hr == S_FALSE, "IPersistStorage_IsDirty should have returned S_FALSE instead of 0x%lx\n", hr);
IPersistStorage_Release(pPS); IViewObject_Release(pViewObject); @@ -1833,7 +1833,7 @@ static void test_data_cache(void) ok_ole_success(hr, "IPersistStorage_Load");
hr = IPersistStorage_IsDirty(pPS); - ok(hr == S_FALSE, "IPersistStorage_IsDirty should have returned S_FALSE instead of 0x%x\n", hr); + ok(hr == S_FALSE, "IPersistStorage_IsDirty should have returned S_FALSE instead of 0x%lx\n", hr);
fmtetc.cfFormat = 0; fmtetc.dwAspect = DVASPECT_ICON; @@ -1841,7 +1841,7 @@ static void test_data_cache(void) fmtetc.ptd = NULL; fmtetc.tymed = TYMED_MFPICT; hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); - ok(hr == CACHE_S_SAMECACHE, "IOleCache_Cache with already loaded data format type should return CACHE_S_SAMECACHE instead of 0x%x\n", hr); + ok(hr == CACHE_S_SAMECACHE, "IOleCache_Cache with already loaded data format type should return CACHE_S_SAMECACHE instead of 0x%lx\n", hr);
rcBounds.left = 0; rcBounds.top = 0; @@ -1853,7 +1853,7 @@ static void test_data_cache(void) ok_ole_success(hr, "IViewObject_Draw");
hr = IViewObject_Draw(pViewObject, DVASPECT_CONTENT, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08x\n", hr); + ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08lx\n", hr);
/* unload the cached storage object, causing it to be reloaded */ hr = IOleCache2_DiscardCache(pOleCache, DISCARDCACHE_NOSAVE); @@ -1869,12 +1869,12 @@ static void test_data_cache(void) hr = IOleCache2_DiscardCache(pOleCache, DISCARDCACHE_NOSAVE); ok_ole_success(hr, "IOleCache2_DiscardCache"); hr = IViewObject_Draw(pViewObject, DVASPECT_ICON, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08x\n", hr); + ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08lx\n", hr);
DeleteDC(hdcMem);
hr = IOleCache2_InitCache(pOleCache, &DataObject); - ok(hr == CACHE_E_NOCACHE_UPDATED, "IOleCache_InitCache should have returned CACHE_E_NOCACHE_UPDATED instead of 0x%08x\n", hr); + ok(hr == CACHE_E_NOCACHE_UPDATED, "IOleCache_InitCache should have returned CACHE_E_NOCACHE_UPDATED instead of 0x%08lx\n", hr);
IPersistStorage_Release(pPS); IViewObject_Release(pViewObject); @@ -1900,44 +1900,44 @@ static void test_data_cache(void) ok_ole_success(hr, "IOleCache_Cache");
hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); - ok(hr == OLE_E_BLANK, "got %08x\n", hr); + ok(hr == OLE_E_BLANK, "got %08lx\n", hr);
fmtetc.cfFormat = cf_test_1; fmtetc.dwAspect = DVASPECT_CONTENT; fmtetc.tymed = TYMED_HGLOBAL;
hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); - ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08x\n", hr); + ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08lx\n", hr);
hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); - ok(hr == OLE_E_BLANK, "got %08x\n", hr); + ok(hr == OLE_E_BLANK, "got %08lx\n", hr);
fmtetc.cfFormat = cf_test_2; hr = IOleCache2_Cache(pOleCache, &fmtetc, ADVF_PRIMEFIRST, &dwConnection); - ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08x\n", hr); + ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08lx\n", hr);
hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); - ok(hr == OLE_E_BLANK, "got %08x\n", hr); + ok(hr == OLE_E_BLANK, "got %08lx\n", hr);
hr = IOleCacheControl_OnRun(pOleCacheControl, &DataObject); ok_ole_success(hr, "IOleCacheControl_OnRun");
fmtetc.cfFormat = cf_test_3; hr = IOleCache2_Cache(pOleCache, &fmtetc, 0, &dwConnection); - ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08x\n", hr); + ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED, "got %08lx\n", hr);
fmtetc.cfFormat = cf_test_1; hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); - ok(hr == OLE_E_BLANK, "got %08x\n", hr); + ok(hr == OLE_E_BLANK, "got %08lx\n", hr);
fmtetc.cfFormat = cf_test_2; hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ReleaseStgMedium(&stgmedium);
fmtetc.cfFormat = cf_test_3; hr = IDataObject_GetData(pCacheDataObject, &fmtetc, &stgmedium); - ok(hr == OLE_E_BLANK, "got %08x\n", hr); + ok(hr == OLE_E_BLANK, "got %08lx\n", hr);
IOleCacheControl_Release(pOleCacheControl); IDataObject_Release(pCacheDataObject); @@ -1971,18 +1971,18 @@ static IStorage *create_storage( int num ) ULONG written;
hr = StgCreateDocfile( NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_DELETEONRELEASE, 0, &stg ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr); hr = IStorage_SetClass( stg, &CLSID_Picture_Dib ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr); hr = IStorage_CreateStream( stg, CONTENTS, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, &stm ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr); if (num == 1) /* Set biXPelsPerMeter = 0 */ { file_dib[0x26] = 0; file_dib[0x27] = 0; } hr = IStream_Write( stm, file_dib, sizeof(file_dib), &written ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr); IStream_Release( stm ); return stg; } @@ -2009,31 +2009,31 @@ static void test_data_cache_dib_contents_stream(int num) };
hr = CreateDataCache( NULL, &CLSID_Picture_Metafile, &IID_IUnknown, (void **)&unk ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); + ok( SUCCEEDED(hr), "got %08lx\n", hr ); hr = IUnknown_QueryInterface( unk, &IID_IPersistStorage, (void **)&persist ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); + ok( SUCCEEDED(hr), "got %08lx\n", hr ); hr = IUnknown_QueryInterface( unk, &IID_IDataObject, (void **)&data ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); + ok( SUCCEEDED(hr), "got %08lx\n", hr ); hr = IUnknown_QueryInterface( unk, &IID_IViewObject2, (void **)&view ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); + ok( SUCCEEDED(hr), "got %08lx\n", hr ); hr = IUnknown_QueryInterface( unk, &IID_IOleCache2, (void **)&cache ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); + ok( SUCCEEDED(hr), "got %08lx\n", hr );
stg = create_storage( num );
hr = IPersistStorage_Load( persist, stg ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); + ok( SUCCEEDED(hr), "got %08lx\n", hr ); IStorage_Release( stg );
hr = IPersistStorage_GetClassID( persist, &cls ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); + ok( SUCCEEDED(hr), "got %08lx\n", hr ); ok( IsEqualCLSID( &cls, &CLSID_Picture_Dib ), "class id mismatch\n" );
hr = IDataObject_GetData( data, &fmt, &med ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); - ok( med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed ); + ok( SUCCEEDED(hr), "got %08lx\n", hr ); + ok( med.tymed == TYMED_HGLOBAL, "got %lx\n", med.tymed ); ok( GlobalSize( U(med).hGlobal ) >= sizeof(dib_white) - sizeof(BITMAPFILEHEADER), - "got %lu\n", GlobalSize( U(med).hGlobal ) ); + "got %Iu\n", GlobalSize( U(med).hGlobal ) ); ptr = GlobalLock( U(med).hGlobal );
expect_info = *(BITMAPINFOHEADER *)(file_dib + sizeof(BITMAPFILEHEADER)); @@ -2053,19 +2053,19 @@ static void test_data_cache_dib_contents_stream(int num) check_enum_cache( cache, enum_expect, 2 );
hr = IViewObject2_GetExtent( view, DVASPECT_CONTENT, -1, NULL, &sz ); - ok( SUCCEEDED(hr), "got %08x\n", hr ); + ok( SUCCEEDED(hr), "got %08lx\n", hr ); if (num == 0) { - ok( sz.cx == 1000, "got %d\n", sz.cx ); - ok( sz.cy == 250, "got %d\n", sz.cy ); + ok( sz.cx == 1000, "got %ld\n", sz.cx ); + ok( sz.cy == 250, "got %ld\n", sz.cy ); } else { HDC hdc = GetDC( 0 ); LONG x = 2 * 2540 / GetDeviceCaps( hdc, LOGPIXELSX ); LONG y = 1 * 2540 / GetDeviceCaps( hdc, LOGPIXELSY ); - ok( sz.cx == x, "got %d %d\n", sz.cx, x ); - ok( sz.cy == y, "got %d %d\n", sz.cy, y ); + ok( sz.cx == x, "got %ld %ld\n", sz.cx, x ); + ok( sz.cy == y, "got %ld %ld\n", sz.cy, y );
ReleaseDC( 0, hdc ); } @@ -2091,8 +2091,8 @@ static void check_dib_size( HGLOBAL h, int cx, int cy ) BITMAPINFO *info;
info = GlobalLock( h ); - ok( info->bmiHeader.biWidth == cx, "got %d expect %d\n", info->bmiHeader.biWidth, cx ); - ok( info->bmiHeader.biHeight == cy, "got %d expect %d\n", info->bmiHeader.biHeight, cy ); + ok( info->bmiHeader.biWidth == cx, "got %ld expect %d\n", info->bmiHeader.biWidth, cx ); + ok( info->bmiHeader.biHeight == cy, "got %ld expect %d\n", info->bmiHeader.biHeight, cy ); GlobalUnlock( h ); }
@@ -2120,7 +2120,7 @@ static void test_data_cache_cache(void) };
hr = CreateDataCache( NULL, &CLSID_NULL, &IID_IOleCache2, (void **)&cache ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* create a dib entry which will also create a bitmap entry too */ fmt.cfFormat = CF_DIB; @@ -2130,8 +2130,8 @@ static void test_data_cache_cache(void) fmt.tymed = TYMED_HGLOBAL;
hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( conn == 2, "got %d\n", conn ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( conn == 2, "got %ld\n", conn ); expect[0].dwConnection = conn; expect[1].dwConnection = conn;
@@ -2142,15 +2142,15 @@ static void test_data_cache_cache(void) fmt.tymed = TYMED_GDI;
hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == CACHE_S_SAMECACHE, "got %08x\n", hr ); + ok( hr == CACHE_S_SAMECACHE, "got %08lx\n", hr );
/* metafile */ fmt.cfFormat = CF_METAFILEPICT; fmt.tymed = TYMED_MFPICT;
hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( conn == 3, "got %d\n", conn ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( conn == 3, "got %ld\n", conn ); expect[2].dwConnection = conn;
check_enum_cache( cache, expect, 3); @@ -2160,21 +2160,21 @@ static void test_data_cache_cache(void) fmt.tymed = TYMED_ENHMF;
hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( conn == 4, "got %d\n", conn ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( conn == 4, "got %ld\n", conn ); expect[3].dwConnection = conn;
check_enum_cache( cache, expect, 4 );
/* uncache everything */ hr = IOleCache2_Uncache( cache, expect[3].dwConnection ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = IOleCache2_Uncache( cache, expect[2].dwConnection ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = IOleCache2_Uncache( cache, expect[0].dwConnection ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = IOleCache2_Uncache( cache, expect[0].dwConnection ); - ok( hr == OLE_E_NOCONNECTION, "got %08x\n", hr ); + ok( hr == OLE_E_NOCONNECTION, "got %08lx\n", hr );
check_enum_cache( cache, expect, 0 );
@@ -2183,7 +2183,7 @@ static void test_data_cache_cache(void) fmt.tymed = TYMED_GDI;
hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
expect[0].dwConnection = conn; expect[1].dwConnection = conn; @@ -2192,24 +2192,24 @@ static void test_data_cache_cache(void)
/* Try setting a 1x1 bitmap */ hr = IOleCache2_QueryInterface( cache, &IID_IDataObject, (void **) &data ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
create_bitmap( &med );
hr = IOleCache2_SetData( cache, &fmt, &med, TRUE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData( data, &fmt, &med ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( med.tymed == TYMED_GDI, "got %d\n", med.tymed ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( med.tymed == TYMED_GDI, "got %ld\n", med.tymed ); check_bitmap_size( U(med).hBitmap, 1, 1 ); ReleaseStgMedium( &med );
fmt.cfFormat = CF_DIB; fmt.tymed = TYMED_HGLOBAL; hr = IDataObject_GetData( data, &fmt, &med ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( med.tymed == TYMED_HGLOBAL, "got %d\n", med.tymed ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( med.tymed == TYMED_HGLOBAL, "got %ld\n", med.tymed ); check_dib_size( U(med).hGlobal, 1, 1 ); ReleaseStgMedium( &med );
@@ -2219,96 +2219,96 @@ static void test_data_cache_cache(void) create_dib( &med );
hr = IOleCache2_SetData( cache, &fmt, &med, TRUE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
fmt.cfFormat = CF_BITMAP; fmt.tymed = TYMED_GDI; hr = IDataObject_GetData( data, &fmt, &med ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( med.tymed == TYMED_GDI, "got %d\n", med.tymed ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( med.tymed == TYMED_GDI, "got %ld\n", med.tymed ); check_bitmap_size( U(med).hBitmap, 2, 1 ); ReleaseStgMedium( &med );
fmt.cfFormat = CF_DIB; fmt.tymed = TYMED_HGLOBAL; hr = IDataObject_GetData( data, &fmt, &med ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( med.tymed == TYMED_HGLOBAL, "got %d\n", med.tymed ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( med.tymed == TYMED_HGLOBAL, "got %ld\n", med.tymed ); check_dib_size( U(med).hGlobal, 2, 1 ); ReleaseStgMedium( &med );
/* uncache everything */ hr = IOleCache2_Uncache( cache, conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* view caching */ fmt.cfFormat = 0; fmt.tymed = TYMED_ENHMF; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); view_caching[0].dwConnection = conn;
fmt.tymed = TYMED_HGLOBAL; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == CACHE_S_SAMECACHE, "got %08x\n", hr ); + ok( hr == CACHE_S_SAMECACHE, "got %08lx\n", hr );
fmt.dwAspect = DVASPECT_THUMBNAIL; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); view_caching[1].dwConnection = conn;
fmt.dwAspect = DVASPECT_DOCPRINT; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); view_caching[2].dwConnection = conn;
/* DVASPECT_ICON view cache gets mapped to CF_METAFILEPICT */ fmt.dwAspect = DVASPECT_ICON; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); view_caching[3].dwConnection = conn;
check_enum_cache( cache, view_caching, 4 );
/* uncache everything */ hr = IOleCache2_Uncache( cache, view_caching[3].dwConnection ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = IOleCache2_Uncache( cache, view_caching[2].dwConnection ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = IOleCache2_Uncache( cache, view_caching[1].dwConnection ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = IOleCache2_Uncache( cache, view_caching[0].dwConnection ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* Only able to set cfFormat == CF_METAFILEPICT (or == 0, see above) for DVASPECT_ICON */ fmt.dwAspect = DVASPECT_ICON; fmt.cfFormat = CF_DIB; fmt.tymed = TYMED_HGLOBAL; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == DV_E_FORMATETC, "got %08x\n", hr ); + ok( hr == DV_E_FORMATETC, "got %08lx\n", hr ); fmt.cfFormat = CF_BITMAP; fmt.tymed = TYMED_GDI; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == DV_E_FORMATETC, "got %08x\n", hr ); + ok( hr == DV_E_FORMATETC, "got %08lx\n", hr ); fmt.cfFormat = CF_ENHMETAFILE; fmt.tymed = TYMED_ENHMF; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == DV_E_FORMATETC, "got %08x\n", hr ); + ok( hr == DV_E_FORMATETC, "got %08lx\n", hr ); fmt.cfFormat = CF_METAFILEPICT; fmt.tymed = TYMED_MFPICT; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* uncache everything */ hr = IOleCache2_Uncache( cache, conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* tymed == 0 */ fmt.cfFormat = CF_ENHMETAFILE; fmt.dwAspect = DVASPECT_CONTENT; fmt.tymed = 0; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == DV_E_TYMED, "got %08x\n", hr ); + ok( hr == DV_E_TYMED, "got %08lx\n", hr );
IDataObject_Release( data ); IOleCache2_Release( cache ); @@ -2320,30 +2320,30 @@ static void test_data_cache_cache(void) fmt.dwAspect = DVASPECT_CONTENT; fmt.tymed = TYMED_HGLOBAL; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == CACHE_S_SAMECACHE, "got %08x\n", hr ); + ok( hr == CACHE_S_SAMECACHE, "got %08lx\n", hr );
/* aspect other than DVASPECT_CONTENT should fail */ fmt.dwAspect = DVASPECT_THUMBNAIL; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( FAILED(hr), "got %08x\n", hr ); + ok( FAILED(hr), "got %08lx\n", hr );
fmt.dwAspect = DVASPECT_DOCPRINT; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( FAILED(hr), "got %08x\n", hr ); + ok( FAILED(hr), "got %08lx\n", hr );
/* try caching another clip format */ fmt.cfFormat = CF_METAFILEPICT; fmt.dwAspect = DVASPECT_CONTENT; fmt.tymed = TYMED_MFPICT; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( FAILED(hr), "got %08x\n", hr ); + ok( FAILED(hr), "got %08lx\n", hr );
/* As an exception, it's possible to add an icon aspect */ fmt.cfFormat = CF_METAFILEPICT; fmt.dwAspect = DVASPECT_ICON; fmt.tymed = TYMED_MFPICT; hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
IOleCache2_Release( cache ); } @@ -2379,13 +2379,13 @@ static void test_data_cache_init(void) for (i = 0; i < ARRAY_SIZE(data); i++) { hr = CreateDataCache( NULL, data[i].clsid, &IID_IOleCache2, (void **)&cache ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
check_enum_cache( cache, enum_expect + data[i].enum_start , data[i].enum_num );
IOleCache2_QueryInterface( cache, &IID_IPersistStorage, (void **) &persist ); hr = IPersistStorage_GetClassID( persist, &clsid ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( IsEqualCLSID( &clsid, data[i].clsid ), "class id mismatch %s %s\n", wine_dbgstr_guid( &clsid ), wine_dbgstr_guid( data[i].clsid ) );
@@ -2430,72 +2430,72 @@ static void test_data_cache_initnew(void) };
hr = StgCreateDocfile( NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_DELETEONRELEASE, 0, &stg_dib ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr); hr = IStorage_SetClass( stg_dib, &CLSID_Picture_Dib ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = StgCreateDocfile( NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_DELETEONRELEASE, 0, &stg_mf ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr); hr = IStorage_SetClass( stg_mf, &CLSID_Picture_Metafile ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = StgCreateDocfile( NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_DELETEONRELEASE, 0, &stg_wine ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr); hr = IStorage_SetClass( stg_wine, &CLSID_WineTestOld ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = CreateDataCache( NULL, &CLSID_WineTestOld, &IID_IOleCache2, (void **)&cache ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); IOleCache2_QueryInterface( cache, &IID_IPersistStorage, (void **) &persist );
hr = IPersistStorage_InitNew( persist, stg_dib ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_GetClassID( persist, &clsid ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( IsEqualCLSID( &clsid, &CLSID_Picture_Dib ), "got %s\n", wine_dbgstr_guid( &clsid ) );
check_enum_cache( cache, initnew_expect, 2 );
hr = IPersistStorage_InitNew( persist, stg_mf ); - ok( hr == CO_E_ALREADYINITIALIZED, "got %08x\n", hr); + ok( hr == CO_E_ALREADYINITIALIZED, "got %08lx\n", hr);
hr = IPersistStorage_HandsOffStorage( persist ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_GetClassID( persist, &clsid ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( IsEqualCLSID( &clsid, &CLSID_Picture_Dib ), "got %s\n", wine_dbgstr_guid( &clsid ) );
hr = IPersistStorage_InitNew( persist, stg_mf ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_GetClassID( persist, &clsid ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( IsEqualCLSID( &clsid, &CLSID_Picture_Metafile ), "got %s\n", wine_dbgstr_guid( &clsid ) );
check_enum_cache( cache, initnew2_expect, 3 );
hr = IPersistStorage_HandsOffStorage( persist ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_InitNew( persist, stg_dib ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_GetClassID( persist, &clsid ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( IsEqualCLSID( &clsid, &CLSID_Picture_Dib ), "got %s\n", wine_dbgstr_guid( &clsid ) );
check_enum_cache( cache, initnew3_expect, 5 );
hr = IPersistStorage_HandsOffStorage( persist ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_InitNew( persist, stg_wine ); - ok( hr == S_OK, "got %08x\n", hr); + ok( hr == S_OK, "got %08lx\n", hr);
hr = IPersistStorage_GetClassID( persist, &clsid ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( IsEqualCLSID( &clsid, &CLSID_WineTestOld ), "got %s\n", wine_dbgstr_guid( &clsid ) );
check_enum_cache( cache, initnew4_expect, 5 ); @@ -2539,273 +2539,273 @@ static void test_data_cache_updatecache( void ) };
hr = CreateDataCache( NULL, &CLSID_WineTestOld, &IID_IOleCache2, (void **)&cache ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); IOleCache2_QueryInterface(cache, &IID_IDataObject, (void **)&data);
data_object_format = NULL; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IOleCache2_Cache( cache, &dib_fmt, 0, &conn[0] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == CACHE_E_NOCACHE_UPDATED, "got %08x\n", hr ); + ok( hr == CACHE_E_NOCACHE_UPDATED, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &dib_fmt; data_object_dib = dib_white; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %lu.\n", medium.tymed); ok(compare_global(U(medium).hGlobal, dib_white, sizeof(dib_white)), "Media didn't match.\n");
hr = IOleCache2_Cache(cache, &emf_fmt, 0, &conn[1]); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
data_object_dib = dib_black; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %lu.\n", medium.tymed); ok(compare_global(U(medium).hGlobal, dib_black, sizeof(dib_black)), "Media didn't match.\n");
hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
hr = IDataObject_GetData(data, &wmf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &emf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %lu.\n", medium.tymed);
hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_ENHMF, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_ENHMF, "Got unexpected tymed %lu.\n", medium.tymed);
hr = IDataObject_GetData(data, &wmf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &wmf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %lu.\n", medium.tymed);
hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_ENHMF, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_ENHMF, "Got unexpected tymed %lu.\n", medium.tymed);
hr = IDataObject_GetData(data, &wmf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
hr = IOleCache2_Uncache( cache, conn[1] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &wmf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IOleCache2_Cache( cache, &wmf_fmt, 0, &conn[1] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
data_object_format = &emf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == CACHE_E_NOCACHE_UPDATED, "got %08x\n", hr ); + ok( hr == CACHE_E_NOCACHE_UPDATED, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &wmf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &wmf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &wmf_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IOleCache2_Uncache( cache, conn[1] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = IOleCache2_Uncache( cache, conn[0] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* Test view caching. */
hr = IOleCache2_Cache( cache, &view_fmt, 0, &conn[0] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); view_cache[0].dwConnection = conn[0];
data_object_format = NULL; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == CACHE_E_NOCACHE_UPDATED, "got %08x\n", hr ); + ok( hr == CACHE_E_NOCACHE_UPDATED, "got %08lx\n", hr );
check_enum_cache( cache, view_cache, 1 );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &view_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &dib_fmt; data_object_dib = dib_white; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
view_cache_after_dib[0].dwConnection = view_cache_after_dib[1].dwConnection = view_cache[0].dwConnection; check_enum_cache( cache, view_cache_after_dib, 2 );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %lu.\n", medium.tymed); ok(compare_global(U(medium).hGlobal, dib_white, sizeof(dib_white)), "Media didn't match.\n"); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &view_fmt, &medium); - todo_wine ok(hr == DV_E_CLIPFORMAT, "Got hr %#x.\n", hr); + todo_wine ok(hr == DV_E_CLIPFORMAT, "Got hr %#lx.\n", hr);
data_object_format = &emf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ALL, NULL ); - ok( hr == CACHE_E_NOCACHE_UPDATED, "got %08x\n", hr ); + ok( hr == CACHE_E_NOCACHE_UPDATED, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
hr = IOleCache2_Uncache( cache, conn[0] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* Try some different flags */
hr = IOleCache2_Cache( cache, &dib_fmt, 0, &conn[0] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IOleCache2_Cache( cache, &emf_fmt, ADVF_NODATA, &conn[1] ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
data_object_format = &dib_fmt; data_object_dib = dib_white; hr = IOleCache2_UpdateCache(cache, &DataObject, UPDFCACHE_IFBLANK, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %lu.\n", medium.tymed); ok(compare_global(U(medium).hGlobal, dib_white, sizeof(dib_white)), "Media didn't match.\n"); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_dib = dib_black; hr = IOleCache2_UpdateCache(cache, &DataObject, UPDFCACHE_IFBLANK, NULL); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %lu.\n", medium.tymed); ok(compare_global(U(medium).hGlobal, dib_white, sizeof(dib_white)), "Media didn't match.\n"); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &emf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_IFBLANK , NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %u.\n", medium.tymed); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(medium.tymed == TYMED_HGLOBAL, "Got unexpected tymed %lu.\n", medium.tymed); ok(compare_global(U(medium).hGlobal, dib_white, sizeof(dib_white)), "Media didn't match.\n"); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
hr = IOleCache2_DiscardCache( cache, DISCARDCACHE_NOSAVE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &emf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_IFBLANK | UPDFCACHE_NODATACACHE, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IOleCache2_DiscardCache( cache, DISCARDCACHE_NOSAVE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
data_object_format = &dib_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ONLYIFBLANK | UPDFCACHE_NORMALCACHE, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &emf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ONLYIFBLANK | UPDFCACHE_NORMALCACHE, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_IFBLANK | UPDFCACHE_NORMALCACHE, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
hr = IOleCache2_DiscardCache( cache, DISCARDCACHE_NOSAVE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
data_object_format = &dib_fmt; hr = IOleCache2_InitCache( cache, &DataObject ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
data_object_format = &emf_fmt; hr = IOleCache2_UpdateCache( cache, &DataObject, UPDFCACHE_ONLYIFBLANK | UPDFCACHE_NORMALCACHE, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IDataObject_GetData(data, &dib_fmt, &medium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDataObject_GetData(data, &emf_fmt, &medium); - ok(hr == OLE_E_BLANK, "Got hr %#x.\n", hr); + ok(hr == OLE_E_BLANK, "Got hr %#lx.\n", hr);
IDataObject_Release(data); IOleCache2_Release( cache ); @@ -2839,13 +2839,13 @@ static void test_default_handler(void) };
hr = CoCreateInstance(&CLSID_WineTest, NULL, CLSCTX_INPROC_HANDLER, &IID_IOleObject, (void **)&pObject); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed with REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed with REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr);
hr = OleCreateDefaultHandler(&CLSID_WineTest, NULL, &IID_IOleObject, (void **)&pObject); ok_ole_success(hr, "OleCreateDefaultHandler");
hr = IOleObject_QueryInterface(pObject, &IID_IOleInPlaceObject, (void **)&pInPlaceObj); - ok(hr == E_NOINTERFACE, "IOleObject_QueryInterface(&IID_IOleInPlaceObject) should return E_NOINTERFACE instead of 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "IOleObject_QueryInterface(&IID_IOleInPlaceObject) should return E_NOINTERFACE instead of 0x%08lx\n", hr);
hr = IOleObject_Advise(pObject, &AdviseSink, &dwAdvConn); ok_ole_success(hr, "IOleObject_Advise"); @@ -2856,7 +2856,7 @@ static void test_default_handler(void) /* FIXME: test IOleObject_EnumAdvise */
hr = IOleObject_EnumVerbs(pObject, &pEnumVerbs); - ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_EnumVerbs should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_EnumVerbs should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr);
hr = IOleObject_GetClientSite(pObject, &pClientSite); ok_ole_success(hr, "IOleObject_GetClientSite"); @@ -2866,15 +2866,15 @@ static void test_default_handler(void)
hr = IOleObject_GetClipboardData(pObject, 0, &pDataObject); ok(hr == OLE_E_NOTRUNNING, - "IOleObject_GetClipboardData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", + "IOleObject_GetClipboardData should have returned OLE_E_NOTRUNNING instead of 0x%08lx\n", hr);
hr = IOleObject_GetExtent(pObject, DVASPECT_CONTENT, &sizel); - ok(hr == OLE_E_BLANK, "IOleObject_GetExtent should have returned OLE_E_BLANK instead of 0x%08x\n", + ok(hr == OLE_E_BLANK, "IOleObject_GetExtent should have returned OLE_E_BLANK instead of 0x%08lx\n", hr);
hr = IOleObject_GetMiscStatus(pObject, DVASPECT_CONTENT, &dwStatus); - ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_GetMiscStatus should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_GetMiscStatus should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr);
hr = IOleObject_GetUserClassID(pObject, &clsid); ok_ole_success(hr, "IOleObject_GetUserClassID"); @@ -2887,20 +2887,20 @@ static void test_default_handler(void) }
hr = IOleObject_InitFromData(pObject, NULL, TRUE, 0); - ok(hr == OLE_E_NOTRUNNING, "IOleObject_InitFromData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); + ok(hr == OLE_E_NOTRUNNING, "IOleObject_InitFromData should have returned OLE_E_NOTRUNNING instead of 0x%08lx\n", hr);
hr = IOleObject_IsUpToDate(pObject); - ok(hr == OLE_E_NOTRUNNING, "IOleObject_IsUpToDate should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); + ok(hr == OLE_E_NOTRUNNING, "IOleObject_IsUpToDate should have returned OLE_E_NOTRUNNING instead of 0x%08lx\n", hr);
palette.palNumEntries = 1; palette.palVersion = 2; memset(&palette.palPalEntry[0], 0, sizeof(palette.palPalEntry[0])); hr = IOleObject_SetColorScheme(pObject, &palette); - ok(hr == OLE_E_NOTRUNNING, "IOleObject_SetColorScheme should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); + ok(hr == OLE_E_NOTRUNNING, "IOleObject_SetColorScheme should have returned OLE_E_NOTRUNNING instead of 0x%08lx\n", hr);
sizel.cx = sizel.cy = 0; hr = IOleObject_SetExtent(pObject, DVASPECT_CONTENT, &sizel); - ok(hr == OLE_E_NOTRUNNING, "IOleObject_SetExtent should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); + ok(hr == OLE_E_NOTRUNNING, "IOleObject_SetExtent should have returned OLE_E_NOTRUNNING instead of 0x%08lx\n", hr);
hr = IOleObject_SetHostNames(pObject, wszHostName, NULL); ok_ole_success(hr, "IOleObject_SetHostNames"); @@ -2912,11 +2912,11 @@ static void test_default_handler(void) IMoniker_Release(pMoniker);
hr = IOleObject_GetMoniker(pObject, OLEGETMONIKER_ONLYIFTHERE, OLEWHICHMK_CONTAINER, &pMoniker); - ok(hr == E_FAIL, "IOleObject_GetMoniker should have returned E_FAIL instead of 0x%08x\n", hr); + ok(hr == E_FAIL, "IOleObject_GetMoniker should have returned E_FAIL instead of 0x%08lx\n", hr);
hr = IOleObject_Update(pObject); todo_wine - ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_Update should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_Update should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr);
hr = IOleObject_QueryInterface(pObject, &IID_IDataObject, (void **)&pDataObject); ok_ole_success(hr, "IOleObject_QueryInterface"); @@ -2943,7 +2943,7 @@ static void test_default_handler(void) fmtetc.lindex = -1; fmtetc.tymed = TYMED_ENHMF; hr = IDataObject_QueryGetData(pDataObject, &fmtetc); - ok(hr == OLE_E_NOTRUNNING, "IDataObject_QueryGetData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); + ok(hr == OLE_E_NOTRUNNING, "IDataObject_QueryGetData should have returned OLE_E_NOTRUNNING instead of 0x%08lx\n", hr);
fmtetc.cfFormat = CF_TEXT; fmtetc.ptd = NULL; @@ -2951,7 +2951,7 @@ static void test_default_handler(void) fmtetc.lindex = -1; fmtetc.tymed = TYMED_NULL; hr = IDataObject_QueryGetData(pDataObject, &fmtetc); - ok(hr == OLE_E_NOTRUNNING, "IDataObject_QueryGetData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); + ok(hr == OLE_E_NOTRUNNING, "IDataObject_QueryGetData should have returned OLE_E_NOTRUNNING instead of 0x%08lx\n", hr);
hr = IOleObject_QueryInterface(pObject, &IID_IRunnableObject, (void **)&pRunnableObject); ok_ole_success(hr, "IOleObject_QueryInterface"); @@ -2960,7 +2960,7 @@ static void test_default_handler(void) ok_ole_success(hr, "IRunnableObject_SetContainedObject");
hr = IRunnableObject_Run(pRunnableObject, NULL); - ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_Run should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_Run should have returned REGDB_E_CLASSNOTREG instead of 0x%08lx\n", hr);
hr = IOleObject_Close(pObject, OLECLOSE_NOSAVE); ok_ole_success(hr, "IOleObject_Close"); @@ -2984,25 +2984,25 @@ static void test_default_handler(void)
g_QIFailsWith = E_FAIL; hr = IOleObject_QueryInterface(pObject, &IID_WineTest, (void**)&punk); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
g_QIFailsWith = E_NOINTERFACE; hr = IOleObject_QueryInterface(pObject, &IID_WineTest, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "Got 0x%08lx\n", hr);
g_QIFailsWith = CO_E_OBJNOTCONNECTED; hr = IOleObject_QueryInterface(pObject, &IID_WineTest, (void**)&punk); - ok(hr == CO_E_OBJNOTCONNECTED, "Got 0x%08x\n", hr); + ok(hr == CO_E_OBJNOTCONNECTED, "Got 0x%08lx\n", hr);
g_QIFailsWith = 0x87654321; hr = IOleObject_QueryInterface(pObject, &IID_WineTest, (void**)&punk); - ok(hr == 0x87654321, "Got 0x%08x\n", hr); + ok(hr == 0x87654321, "Got 0x%08lx\n", hr);
IOleObject_Release(pObject); }
CHECK_NO_EXTRA_METHODS(); - todo_wine ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + todo_wine ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
hr = CoRevokeClassObject(dwRegister); ok_ole_success(hr, "CoRevokeClassObject"); @@ -3033,21 +3033,21 @@ static void test_runnable(void) ret = OleIsRunning(object); ok(ret == TRUE, "Object should be running\n"); CHECK_NO_EXTRA_METHODS(); - todo_wine ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + todo_wine ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
g_isRunning = FALSE; expected_method_list = methods_query_runnable; ret = OleIsRunning(object); ok(ret == FALSE, "Object should not be running\n"); CHECK_NO_EXTRA_METHODS(); - todo_wine ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + todo_wine ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
g_showRunnable = FALSE; /* QueryInterface(IID_IRunnableObject, ...) will fail */ expected_method_list = methods_no_runnable; ret = OleIsRunning(object); ok(ret == TRUE, "Object without IRunnableObject should be running\n"); CHECK_NO_EXTRA_METHODS(); - todo_wine ok(!ole_object_refcount, "Got outstanding refcount %d.\n", ole_object_refcount); + todo_wine ok(!ole_object_refcount, "Got outstanding refcount %ld.\n", ole_object_refcount);
g_isRunning = TRUE; g_showRunnable = TRUE; @@ -3133,10 +3133,10 @@ static void test_OleRun(void)
/* doesn't support IRunnableObject */ hr = OleRun(&unknown); - ok(hr == S_OK, "OleRun failed 0x%08x\n", hr); + ok(hr == S_OK, "OleRun failed 0x%08lx\n", hr);
hr = OleRun((IUnknown*)&testrunnable); - ok(hr == 0xdeadc0de, "got 0x%08x\n", hr); + ok(hr == 0xdeadc0de, "got 0x%08lx\n", hr); }
static void test_OleLockRunning(void) @@ -3144,7 +3144,7 @@ static void test_OleLockRunning(void) HRESULT hr;
hr = OleLockRunning(&unknown, TRUE, FALSE); - ok(hr == S_OK, "OleLockRunning failed 0x%08x\n", hr); + ok(hr == S_OK, "OleLockRunning failed 0x%08lx\n", hr); }
static void test_OleDraw(void) @@ -3153,13 +3153,13 @@ static void test_OleDraw(void) RECT rect;
hr = OleDraw((IUnknown*)&viewobject, 0, (HDC)0x1, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = OleDraw(NULL, 0, (HDC)0x1, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = OleDraw(NULL, 0, (HDC)0x1, &rect); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); }
static const WCHAR olepres0W[] = {2,'O','l','e','P','r','e','s','0','0','0',0}; @@ -3198,14 +3198,14 @@ static HRESULT WINAPI Storage_CreateStream(IStorage *iface, LPCOLESTR pwcsName, CHECK_EXPECT(Storage_CreateStream_CompObj); *ppstm = comp_obj_stream;
- todo_wine ok(grfMode == (STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE), "grfMode = %x\n", grfMode); + todo_wine ok(grfMode == (STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE), "grfMode = %lx\n", grfMode); } else if (!lstrcmpW(pwcsName, olepres0W)) { CHECK_EXPECT(Storage_CreateStream_OlePres); *ppstm = olepres_stream;
- todo_wine ok(grfMode == (STGM_SHARE_EXCLUSIVE|STGM_READWRITE), "grfMode = %x\n", grfMode); + todo_wine ok(grfMode == (STGM_SHARE_EXCLUSIVE|STGM_READWRITE), "grfMode = %lx\n", grfMode); } else { @@ -3219,15 +3219,15 @@ static HRESULT WINAPI Storage_CreateStream(IStorage *iface, LPCOLESTR pwcsName, #endif }
- ok(!reserved1, "reserved1 = %x\n", reserved1); - ok(!reserved2, "reserved2 = %x\n", reserved2); + ok(!reserved1, "reserved1 = %lx\n", reserved1); + ok(!reserved2, "reserved2 = %lx\n", reserved2); ok(!!ppstm, "ppstm = NULL\n");
IStream_AddRef(*ppstm); hr = IStream_Seek(*ppstm, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek returned %x\n", hr); + ok(hr == S_OK, "IStream_Seek returned %lx\n", hr); hr = IStream_SetSize(*ppstm, size); - ok(hr == S_OK, "IStream_SetSize returned %x\n", hr); + ok(hr == S_OK, "IStream_SetSize returned %lx\n", hr); return S_OK; }
@@ -3239,45 +3239,45 @@ static HRESULT WINAPI Storage_OpenStream(IStorage *iface, LPCOLESTR pwcsName, vo HRESULT hr;
ok(!reserved1, "reserved1 = %p\n", reserved1); - ok(!reserved2, "reserved2 = %x\n", reserved2); + ok(!reserved2, "reserved2 = %lx\n", reserved2); ok(!!ppstm, "ppstm = NULL\n");
if(!lstrcmpW(pwcsName, comp_objW)) { CHECK_EXPECT2(Storage_OpenStream_CompObj); - ok(grfMode == STGM_SHARE_EXCLUSIVE, "grfMode = %x\n", grfMode); + ok(grfMode == STGM_SHARE_EXCLUSIVE, "grfMode = %lx\n", grfMode);
*ppstm = comp_obj_stream; IStream_AddRef(comp_obj_stream); hr = IStream_Seek(comp_obj_stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek returned %x\n", hr); + ok(hr == S_OK, "IStream_Seek returned %lx\n", hr); return S_OK; }else if(!lstrcmpW(pwcsName, ole1W)) { CHECK_EXPECT(Storage_OpenStream_Ole);
if (!ole_stream) { - ok(grfMode == (STGM_SHARE_EXCLUSIVE|STGM_READ), "grfMode = %x\n", grfMode); + ok(grfMode == (STGM_SHARE_EXCLUSIVE|STGM_READ), "grfMode = %lx\n", grfMode);
*ppstm = NULL; return STG_E_FILENOTFOUND; }
- ok(grfMode == (STGM_SHARE_EXCLUSIVE|STGM_READWRITE), "grfMode = %x\n", grfMode); + ok(grfMode == (STGM_SHARE_EXCLUSIVE|STGM_READWRITE), "grfMode = %lx\n", grfMode);
*ppstm = ole_stream; IStream_AddRef(ole_stream); hr = IStream_Seek(ole_stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek returned %x\n", hr); + ok(hr == S_OK, "IStream_Seek returned %lx\n", hr); return S_OK;
}else if(!lstrcmpW(pwcsName, olepres0W)) { CHECK_EXPECT(Storage_OpenStream_OlePres); - ok(grfMode == (STGM_SHARE_EXCLUSIVE|STGM_READWRITE), "grfMode = %x\n", grfMode); + ok(grfMode == (STGM_SHARE_EXCLUSIVE|STGM_READWRITE), "grfMode = %lx\n", grfMode);
*ppstm = olepres_stream; IStream_AddRef(olepres_stream); hr = IStream_Seek(olepres_stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek returned %x\n", hr); + ok(hr == S_OK, "IStream_Seek returned %lx\n", hr); return S_OK; }
@@ -3375,7 +3375,7 @@ static HRESULT WINAPI Storage_Stat(IStorage *iface, STATSTG *pstatstg, DWORD grf { CHECK_EXPECT2(Storage_Stat); ok(pstatstg != NULL, "pstatstg = NULL\n"); - ok(grfStatFlag == STATFLAG_NONAME, "grfStatFlag = %x\n", grfStatFlag); + ok(grfStatFlag == STATFLAG_NONAME, "grfStatFlag = %lx\n", grfStatFlag);
memset(pstatstg, 0, sizeof(STATSTG)); pstatstg->type = STGTY_STORAGE; @@ -3447,18 +3447,18 @@ static void test_OleDoAutoConvert(void) HRESULT hr;
hr = CreateStreamOnHGlobal(NULL, TRUE, &comp_obj_stream); - ok(hr == S_OK, "CreateStreamOnHGlobal returned %x\n", hr); + ok(hr == S_OK, "CreateStreamOnHGlobal returned %lx\n", hr); hr = IStream_Write(comp_obj_stream, (char*)&comp_obj_data, sizeof(comp_obj_data), NULL); - ok(hr == S_OK, "IStream_Write returned %x\n", hr); + ok(hr == S_OK, "IStream_Write returned %lx\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &ole_stream); - ok(hr == S_OK, "CreateStreamOnHGlobal returned %x\n", hr); + ok(hr == S_OK, "CreateStreamOnHGlobal returned %lx\n", hr); hr = IStream_Write(ole_stream, (char*)&ole_data, sizeof(ole_data), NULL); - ok(hr == S_OK, "IStream_Write returned %x\n", hr); + ok(hr == S_OK, "IStream_Write returned %lx\n", hr);
clsid = IID_WineTest; hr = OleDoAutoConvert(NULL, &clsid); - ok(hr == E_INVALIDARG, "OleDoAutoConvert returned %x\n", hr); + ok(hr == E_INVALIDARG, "OleDoAutoConvert returned %lx\n", hr); ok(IsEqualIID(&clsid, &IID_NULL), "clsid = %s\n", wine_dbgstr_guid(&clsid));
if(0) /* crashes on Win7 */ @@ -3467,7 +3467,7 @@ static void test_OleDoAutoConvert(void) clsid = IID_WineTest; SET_EXPECT(Storage_Stat); hr = OleDoAutoConvert(&Storage, &clsid); - ok(hr == REGDB_E_CLASSNOTREG, "OleDoAutoConvert returned %x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "OleDoAutoConvert returned %lx\n", hr); CHECK_CALLED(Storage_Stat); ok(IsEqualIID(&clsid, &CLSID_WineTestOld), "clsid = %s\n", wine_dbgstr_guid(&clsid));
@@ -3477,14 +3477,14 @@ static void test_OleDoAutoConvert(void) ret = RegCreateKeyExW(HKEY_CLASSES_ROOT, buf, 0, NULL, 0, KEY_READ | KEY_WRITE | KEY_CREATE_SUB_KEY, NULL, &root, NULL); if(ret != ERROR_SUCCESS) { - win_skip("not enough permissions to create CLSID key (%u)\n", ret); + win_skip("not enough permissions to create CLSID key (%lu)\n", ret); return; }
clsid = IID_WineTest; SET_EXPECT(Storage_Stat); hr = OleDoAutoConvert(&Storage, &clsid); - ok(hr == REGDB_E_KEYMISSING, "OleDoAutoConvert returned %x\n", hr); + ok(hr == REGDB_E_KEYMISSING, "OleDoAutoConvert returned %lx\n", hr); CHECK_CALLED(Storage_Stat); ok(IsEqualIID(&clsid, &CLSID_WineTestOld), "clsid = %s\n", wine_dbgstr_guid(&clsid));
@@ -3502,7 +3502,7 @@ static void test_OleDoAutoConvert(void) SET_EXPECT(Storage_CreateStream_CompObj); SET_EXPECT(Storage_OpenStream_Ole); hr = OleDoAutoConvert(&Storage, &clsid); - ok(hr == S_OK, "OleDoAutoConvert returned %x\n", hr); + ok(hr == S_OK, "OleDoAutoConvert returned %lx\n", hr); CHECK_CALLED(Storage_Stat); CHECK_CALLED(Storage_OpenStream_CompObj); CHECK_CALLED(Storage_SetClass); @@ -3511,58 +3511,58 @@ static void test_OleDoAutoConvert(void) ok(IsEqualIID(&clsid, &CLSID_WineTest), "clsid = %s\n", wine_dbgstr_guid(&clsid));
hr = IStream_Seek(comp_obj_stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek returned %x\n", hr); + ok(hr == S_OK, "IStream_Seek returned %lx\n", hr); hr = IStream_Read(comp_obj_stream, &comp_obj_data, sizeof(comp_obj_data), NULL); - ok(hr == S_OK, "IStream_Read returned %x\n", hr); - ok(comp_obj_data.reserved1 == 0xfffe0001, "reserved1 = %x\n", comp_obj_data.reserved1); - ok(comp_obj_data.version == 0xa03, "version = %x\n", comp_obj_data.version); - ok(comp_obj_data.reserved2[0] == -1, "reserved2[0] = %x\n", comp_obj_data.reserved2[0]); + ok(hr == S_OK, "IStream_Read returned %lx\n", hr); + ok(comp_obj_data.reserved1 == 0xfffe0001, "reserved1 = %lx\n", comp_obj_data.reserved1); + ok(comp_obj_data.version == 0xa03, "version = %lx\n", comp_obj_data.version); + ok(comp_obj_data.reserved2[0] == -1, "reserved2[0] = %lx\n", comp_obj_data.reserved2[0]); ok(IsEqualIID(comp_obj_data.reserved2+1, &CLSID_WineTestOld), "reserved2 = %s\n", wine_dbgstr_guid((CLSID*)(comp_obj_data.reserved2+1))); - ok(!comp_obj_data.ansi_user_type_len, "ansi_user_type_len = %d\n", comp_obj_data.ansi_user_type_len); - ok(!comp_obj_data.ansi_clipboard_format_len, "ansi_clipboard_format_len = %d\n", comp_obj_data.ansi_clipboard_format_len); - ok(!comp_obj_data.reserved3, "reserved3 = %x\n", comp_obj_data.reserved3); - ok(comp_obj_data.unicode_marker == 0x71b239f4, "unicode_marker = %x\n", comp_obj_data.unicode_marker); - ok(!comp_obj_data.unicode_user_type_len, "unicode_user_type_len = %d\n", comp_obj_data.unicode_user_type_len); - ok(!comp_obj_data.unicode_clipboard_format_len, "unicode_clipboard_format_len = %d\n", comp_obj_data.unicode_clipboard_format_len); - ok(!comp_obj_data.reserved4, "reserved4 %d\n", comp_obj_data.reserved4); + ok(!comp_obj_data.ansi_user_type_len, "ansi_user_type_len = %ld\n", comp_obj_data.ansi_user_type_len); + ok(!comp_obj_data.ansi_clipboard_format_len, "ansi_clipboard_format_len = %ld\n", comp_obj_data.ansi_clipboard_format_len); + ok(!comp_obj_data.reserved3, "reserved3 = %lx\n", comp_obj_data.reserved3); + ok(comp_obj_data.unicode_marker == 0x71b239f4, "unicode_marker = %lx\n", comp_obj_data.unicode_marker); + ok(!comp_obj_data.unicode_user_type_len, "unicode_user_type_len = %ld\n", comp_obj_data.unicode_user_type_len); + ok(!comp_obj_data.unicode_clipboard_format_len, "unicode_clipboard_format_len = %ld\n", comp_obj_data.unicode_clipboard_format_len); + ok(!comp_obj_data.reserved4, "reserved4 %ld\n", comp_obj_data.reserved4);
hr = IStream_Seek(ole_stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek returned %x\n", hr); + ok(hr == S_OK, "IStream_Seek returned %lx\n", hr); hr = IStream_Read(ole_stream, &ole_data, sizeof(ole_data), NULL); - ok(hr == S_OK, "IStream_Read returned %x\n", hr); - ok(ole_data.version == 0, "version = %x\n", ole_data.version); - ok(ole_data.flags == 4, "flags = %x\n", ole_data.flags); + ok(hr == S_OK, "IStream_Read returned %lx\n", hr); + ok(ole_data.version == 0, "version = %lx\n", ole_data.version); + ok(ole_data.flags == 4, "flags = %lx\n", ole_data.flags); for(i=2; i<sizeof(ole_data)/sizeof(DWORD); i++) - ok(((DWORD*)&ole_data)[i] == 0, "ole_data[%d] = %x\n", i, ((DWORD*)&ole_data)[i]); + ok(((DWORD*)&ole_data)[i] == 0, "ole_data[%ld] = %lx\n", i, ((DWORD*)&ole_data)[i]);
SET_EXPECT(Storage_OpenStream_Ole); hr = SetConvertStg(&Storage, TRUE); - ok(hr == S_OK, "SetConvertStg returned %x\n", hr); + ok(hr == S_OK, "SetConvertStg returned %lx\n", hr); CHECK_CALLED(Storage_OpenStream_Ole);
SET_EXPECT(Storage_OpenStream_CompObj); SET_EXPECT(Storage_Stat); SET_EXPECT(Storage_CreateStream_CompObj); hr = WriteFmtUserTypeStg(&Storage, 0, NULL); - ok(hr == S_OK, "WriteFmtUserTypeStg returned %x\n", hr); + ok(hr == S_OK, "WriteFmtUserTypeStg returned %lx\n", hr); todo_wine CHECK_CALLED(Storage_OpenStream_CompObj); CHECK_CALLED(Storage_Stat); CHECK_CALLED(Storage_CreateStream_CompObj); hr = IStream_Seek(comp_obj_stream, pos, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek returned %x\n", hr); + ok(hr == S_OK, "IStream_Seek returned %lx\n", hr); hr = IStream_Read(comp_obj_stream, &comp_obj_data, sizeof(comp_obj_data), NULL); - ok(hr == S_OK, "IStream_Read returned %x\n", hr); - ok(comp_obj_data.reserved1 == 0xfffe0001, "reserved1 = %x\n", comp_obj_data.reserved1); - ok(comp_obj_data.version == 0xa03, "version = %x\n", comp_obj_data.version); - ok(comp_obj_data.reserved2[0] == -1, "reserved2[0] = %x\n", comp_obj_data.reserved2[0]); + ok(hr == S_OK, "IStream_Read returned %lx\n", hr); + ok(comp_obj_data.reserved1 == 0xfffe0001, "reserved1 = %lx\n", comp_obj_data.reserved1); + ok(comp_obj_data.version == 0xa03, "version = %lx\n", comp_obj_data.version); + ok(comp_obj_data.reserved2[0] == -1, "reserved2[0] = %lx\n", comp_obj_data.reserved2[0]); ok(IsEqualIID(comp_obj_data.reserved2+1, &CLSID_WineTestOld), "reserved2 = %s\n", wine_dbgstr_guid((CLSID*)(comp_obj_data.reserved2+1))); - ok(!comp_obj_data.ansi_user_type_len, "ansi_user_type_len = %d\n", comp_obj_data.ansi_user_type_len); - ok(!comp_obj_data.ansi_clipboard_format_len, "ansi_clipboard_format_len = %d\n", comp_obj_data.ansi_clipboard_format_len); - ok(!comp_obj_data.reserved3, "reserved3 = %x\n", comp_obj_data.reserved3); - ok(comp_obj_data.unicode_marker == 0x71b239f4, "unicode_marker = %x\n", comp_obj_data.unicode_marker); - ok(!comp_obj_data.unicode_user_type_len, "unicode_user_type_len = %d\n", comp_obj_data.unicode_user_type_len); - ok(!comp_obj_data.unicode_clipboard_format_len, "unicode_clipboard_format_len = %d\n", comp_obj_data.unicode_clipboard_format_len); - ok(!comp_obj_data.reserved4, "reserved4 %d\n", comp_obj_data.reserved4); + ok(!comp_obj_data.ansi_user_type_len, "ansi_user_type_len = %ld\n", comp_obj_data.ansi_user_type_len); + ok(!comp_obj_data.ansi_clipboard_format_len, "ansi_clipboard_format_len = %ld\n", comp_obj_data.ansi_clipboard_format_len); + ok(!comp_obj_data.reserved3, "reserved3 = %lx\n", comp_obj_data.reserved3); + ok(comp_obj_data.unicode_marker == 0x71b239f4, "unicode_marker = %lx\n", comp_obj_data.unicode_marker); + ok(!comp_obj_data.unicode_user_type_len, "unicode_user_type_len = %ld\n", comp_obj_data.unicode_user_type_len); + ok(!comp_obj_data.unicode_clipboard_format_len, "unicode_clipboard_format_len = %ld\n", comp_obj_data.unicode_clipboard_format_len); + ok(!comp_obj_data.reserved4, "reserved4 %ld\n", comp_obj_data.reserved4);
ret = IStream_Release(comp_obj_stream); ok(!ret, "comp_obj_stream was not freed\n"); @@ -3570,9 +3570,9 @@ static void test_OleDoAutoConvert(void) ok(!ret, "ole_stream was not freed\n");
ret = RegDeleteKeyA(root, "AutoConvertTo"); - ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret); + ok(ret == ERROR_SUCCESS, "RegDeleteKey error %lu\n", ret); ret = RegDeleteKeyA(root, ""); - ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret); + ok(ret == ERROR_SUCCESS, "RegDeleteKey error %lu\n", ret); RegCloseKey(root); }
@@ -3610,28 +3610,28 @@ static void test_data_cache_save(void) PresentationDataHeader hdr;
hr = CreateILockBytesOnHGlobal(0, TRUE, &ilb); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = StgCreateDocfileOnILockBytes(ilb, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &doc); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
ILockBytes_Release(ilb);
hr = IStorage_SetClass(doc, &CLSID_WineTest); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IStorage_CreateStream(doc, contentsW, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = IStream_Write(stm, bmpimage, sizeof(bmpimage), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); IStream_Release(stm);
hr = IStorage_CreateStream(doc, olepres0W, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
clipformat[0] = -1; clipformat[1] = CF_METAFILEPICT; hr = IStream_Write(stm, clipformat, sizeof(clipformat), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hdr.tdSize = sizeof(hdr.tdSize); hdr.dvAspect = DVASPECT_CONTENT; @@ -3642,31 +3642,31 @@ static void test_data_cache_save(void) hdr.dwObjectExtentY = 0; hdr.dwSize = sizeof(mf_blank_bits); hr = IStream_Write(stm, &hdr, sizeof(hdr), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = IStream_Write(stm, mf_blank_bits, sizeof(mf_blank_bits), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
IStream_Release(stm);
hr = CreateDataCache(NULL, &CLSID_NULL, &IID_IUnknown, (void **)&cache); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = IOleCache2_QueryInterface(cache, &IID_IPersistStorage, (void **)&stg); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = IPersistStorage_Load(stg, doc); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
IStorage_Release(doc);
hr = IPersistStorage_IsDirty(stg); - ok(hr == S_FALSE, "unexpected %#x\n", hr); + ok(hr == S_FALSE, "unexpected %#lx\n", hr);
ole_stream = NULL; hr = CreateStreamOnHGlobal(NULL, TRUE, &olepres_stream); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
/* FIXME: remove this stream once Wine is fixed */ hr = CreateStreamOnHGlobal(NULL, TRUE, &contents_stream); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
SET_EXPECT(Storage_CreateStream_OlePres); SET_EXPECT(Storage_OpenStream_OlePres); @@ -3675,7 +3675,7 @@ static void test_data_cache_save(void) Storage_DestroyElement_limit = 50; Storage_SetClass_CLSID = &CLSID_NULL; hr = IPersistStorage_Save(stg, &Storage, FALSE); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); CHECK_CALLED(Storage_CreateStream_OlePres); todo_wine CHECK_CALLED(Storage_OpenStream_OlePres); @@ -3866,12 +3866,12 @@ static void check_storage_contents(IStorage *stg, const struct storage_def *stg_ *matched_streams = 0;
hr = IStorage_Stat(stg, &stat, STATFLAG_NONAME); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); ok(IsEqualCLSID(stg_def->clsid, &stat.clsid), "expected %s, got %s\n", wine_dbgstr_guid(stg_def->clsid), wine_dbgstr_guid(&stat.clsid));
hr = IStorage_EnumElements(stg, 0, NULL, 0, &enumstg); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
for (;;) { @@ -3885,18 +3885,18 @@ static void check_storage_contents(IStorage *stg, const struct storage_def *stg_
hr = IEnumSTATSTG_Next(enumstg, 1, &stat, NULL); if(hr == S_FALSE) break; - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
if (winetest_debug > 1) - trace("name %s, type %u, size %d, clsid %s\n", + trace("name %s, type %lu, size %ld, clsid %s\n", wine_dbgstr_w(stat.pwcsName), stat.type, stat.cbSize.u.LowPart, wine_dbgstr_guid(&stat.clsid));
- ok(stat.type == STGTY_STREAM, "unexpected %#x\n", stat.type); + ok(stat.type == STGTY_STREAM, "unexpected %#lx\n", stat.type);
WideCharToMultiByte(CP_ACP, 0, stat.pwcsName, -1, name, sizeof(name), NULL, NULL);
hr = IStorage_OpenStream(stg, stat.pwcsName, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
if (!memcmp(name, "\2OlePres", 8)) { @@ -3908,27 +3908,27 @@ static void check_storage_contents(IStorage *stg, const struct storage_def *stg_ header_size = FIELD_OFFSET(PresentationDataHeader, unknown7);
hr = IStream_Read(stream, &header, header_size, &bytes); - ok(hr == S_OK, "unexpected %#x\n", hr); - ok(bytes == header_size, "read %u bytes, expected %u\n", bytes, header_size); + ok(hr == S_OK, "unexpected %#lx\n", hr); + ok(bytes == header_size, "read %lu bytes, expected %lu\n", bytes, header_size);
if (winetest_debug > 1) - trace("header: tdSize %#x, dvAspect %#x, lindex %#x, advf %#x, unknown7 %#x, dwObjectExtentX %#x, dwObjectExtentY %#x, dwSize %#x\n", + trace("header: tdSize %#lx, dvAspect %#x, lindex %#lx, advf %#lx, unknown7 %#lx, dwObjectExtentX %#lx, dwObjectExtentY %#lx, dwSize %#lx\n", header.tdSize, header.dvAspect, header.lindex, header.advf, header.unknown7, header.dwObjectExtentX, header.dwObjectExtentY, header.dwSize); }
memset(data, 0, sizeof(data)); hr = IStream_Read(stream, data, sizeof(data), &bytes); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); if (winetest_debug > 1) - trace("stream data (%u bytes): %02x %02x %02x %02x\n", bytes, data[0], data[1], data[2], data[3]); + trace("stream data (%lu bytes): %02x %02x %02x %02x\n", bytes, data[0], data[1], data[2], data[3]);
for (i = 0; i < stg_def->stream_count; i++) { if (seen_stream[i]) continue;
if (winetest_debug > 1) - trace("%s/%s, %d/%d, %d/%d, %d/%d\n", + trace("%s/%s, %d/%d, %d/%d, %d/%ld\n", stg_def->stream[i].name, name, stg_def->stream[i].cf, clipformat, stg_def->stream[i].dvAspect, header.dvAspect, @@ -4043,10 +4043,10 @@ static IStorage *create_storage_from_def(const struct storage_def *stg_def) int i;
hr = StgCreateDocfile(NULL, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &stg); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IStorage_SetClass(stg, stg_def->clsid); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
for (i = 0; i < stg_def->stream_count; i++) { @@ -4054,7 +4054,7 @@ static IStorage *create_storage_from_def(const struct storage_def *stg_def)
MultiByteToWideChar(CP_ACP, 0, stg_def->stream[i].name, -1, name, 32); hr = IStorage_CreateStream(stg, name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
if (stg_def->stream[i].cf != -1) { @@ -4072,7 +4072,7 @@ static IStorage *create_storage_from_def(const struct storage_def *stg_def) clipformat[0] = 0; hr = IStream_Write(stm, &clipformat[0], sizeof(clipformat[0]), NULL); } - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hdr.tdSize = sizeof(hdr.tdSize); hdr.dvAspect = stg_def->stream[i].dvAspect; @@ -4083,13 +4083,13 @@ static IStorage *create_storage_from_def(const struct storage_def *stg_def) hdr.dwObjectExtentY = 0; hdr.dwSize = stg_def->stream[i].data_size; hr = IStream_Write(stm, &hdr, sizeof(hdr), NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); }
if (stg_def->stream[i].data_size) { hr = IStream_Write(stm, stg_def->stream[i].data, stg_def->stream[i].data_size, NULL); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); }
IStream_Release(stm); @@ -4317,39 +4317,39 @@ static void test_data_cache_save_data(void) for (pdata = data; pdata->clsid != NULL; pdata++) { hr = CreateDataCache(NULL, pdata->clsid, &IID_IOleCache2, (void **)&cache); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
for (i = 0; i < pdata->num_fmts; i++) { hr = IOleCache2_Cache(cache, &pdata->fmts[i], 0, &dummy); - ok(SUCCEEDED(hr), "unexpected %#x\n", hr); + ok(SUCCEEDED(hr), "unexpected %#lx\n", hr); if (i < pdata->num_set) { get_stgmedium(pdata->fmts[i].cfFormat, &stgmeds[i]); get_stgdef(&pdata->stg_def, pdata->fmts[i].cfFormat, &stgmeds[i], i); hr = IOleCache2_SetData(cache, &pdata->fmts[i], &stgmeds[i], FALSE); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); } }
/* create Storage in memory where we'll save cache */ hr = CreateILockBytesOnHGlobal(0, TRUE, &ilb); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = StgCreateDocfileOnILockBytes(ilb, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &doc); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); ILockBytes_Release(ilb); hr = IStorage_SetClass(doc, &CLSID_WineTestOld); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IOleCache2_QueryInterface(cache, &IID_IPersistStorage, (void **)&persist); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
/* cache entries are dirty. test saving them to stg */ hr = IPersistStorage_Save(persist, doc, FALSE); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IPersistStorage_IsDirty(persist); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
check_storage_contents(doc, &pdata->stg_def, &enumerated_streams, &matched_streams); ok(enumerated_streams == matched_streams, "enumerated %d != matched %d\n", @@ -4362,24 +4362,24 @@ static void test_data_cache_save_data(void)
/* now test _Load/_GetData using the storage we used for _Save */ hr = CreateDataCache(NULL, pdata->clsid, &IID_IOleCache2, (void **)&cache); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = IOleCache2_QueryInterface(cache, &IID_IPersistStorage, (void **)&persist); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IStorage_SetClass(doc, pdata->clsid); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = IPersistStorage_Load(persist, doc); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IOleCache2_QueryInterface(cache, &IID_IDataObject, (void **)&odata); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); for (i = 0; i < pdata->num_set; i++) { hr = IDataObject_GetData(odata, &pdata->fmts[i], &stgmed); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = stgmedium_cmp(&stgmeds[i], &stgmed); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); ReleaseStgMedium(&stgmed); ReleaseStgMedium(&stgmeds[i]); } @@ -4435,22 +4435,22 @@ static void test_data_cache_contents(void) enumerated_streams, test_data[i].in->stream_count);
hr = CreateDataCache(NULL, &CLSID_NULL, &IID_IUnknown, (void **)&cache); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = IOleCache2_QueryInterface(cache, &IID_IPersistStorage, (void **)&stg); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr); hr = IPersistStorage_Load(stg, doc1); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
IStorage_Release(doc1);
hr = StgCreateDocfile(NULL, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &doc2); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
hr = IPersistStorage_IsDirty(stg); - ok(hr == S_FALSE, "%d: unexpected %#x\n", i, hr); + ok(hr == S_FALSE, "%d: unexpected %#lx\n", i, hr);
hr = IPersistStorage_Save(stg, doc2, FALSE); - ok(hr == S_OK, "unexpected %#x\n", hr); + ok(hr == S_OK, "unexpected %#lx\n", hr);
IPersistStorage_Release(stg);
@@ -4508,30 +4508,30 @@ static void test_OleCreateStaticFromData(void)
hr = CreateILockBytesOnHGlobal(NULL, TRUE, &ilb); - ok(hr == S_OK, "CreateILockBytesOnHGlobal failed: 0x%08x.\n", hr); + ok(hr == S_OK, "CreateILockBytesOnHGlobal failed: 0x%08lx.\n", hr); hr = StgCreateDocfileOnILockBytes(ilb, STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_READWRITE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfileOnILockBytes failed: 0x%08x.\n", hr); + ok(hr == S_OK, "StgCreateDocfileOnILockBytes failed: 0x%08lx.\n", hr); ILockBytes_Release(ilb);
hr = OleCreateStaticFromData(&DataObject, &IID_IOleObject, OLERENDER_FORMAT, &dib_fmt, NULL, NULL, (void **)&ole_obj); - ok(hr == E_INVALIDARG, "OleCreateStaticFromData should fail: 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "OleCreateStaticFromData should fail: 0x%08lx.\n", hr);
hr = OleCreateStaticFromData(&DataObject, &IID_IOleObject, OLERENDER_FORMAT, &dib_fmt, NULL, storage, NULL); - ok(hr == E_INVALIDARG, "OleCreateStaticFromData should fail: 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "OleCreateStaticFromData should fail: 0x%08lx.\n", hr);
/* CF_DIB */ data_object_format = &dib_fmt; data_object_dib = dib_white; hr = OleCreateStaticFromData(&DataObject, &IID_IOleObject, OLERENDER_FORMAT, &dib_fmt, NULL, storage, (void **)&ole_obj); - ok(hr == S_OK, "OleCreateStaticFromData failed: 0x%08x.\n", hr); + ok(hr == S_OK, "OleCreateStaticFromData failed: 0x%08lx.\n", hr); hr = IOleObject_QueryInterface(ole_obj, &IID_IPersist, (void **)&persist); - ok(hr == S_OK, "IOleObject_QueryInterface failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IOleObject_QueryInterface failed: 0x%08lx.\n", hr); hr = IPersist_GetClassID(persist, &clsid); - ok(hr == S_OK, "IPersist_GetClassID failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IPersist_GetClassID failed: 0x%08lx.\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_Picture_Dib), "Got wrong clsid: %s, expected: %s.\n", wine_dbgstr_guid(&clsid), wine_dbgstr_guid(&CLSID_Picture_Dib)); hr = IStorage_Stat(storage, &statstg, STATFLAG_NONAME); @@ -4552,19 +4552,19 @@ static void test_OleCreateStaticFromData(void)
/* CF_ENHMETAFILE */ hr = CreateILockBytesOnHGlobal(NULL, TRUE, &ilb); - ok(hr == S_OK, "CreateILockBytesOnHGlobal failed: 0x%08x.\n", hr); + ok(hr == S_OK, "CreateILockBytesOnHGlobal failed: 0x%08lx.\n", hr); hr = StgCreateDocfileOnILockBytes(ilb, STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_READWRITE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfileOnILockBytes failed: 0x%08x.\n", hr); + ok(hr == S_OK, "StgCreateDocfileOnILockBytes failed: 0x%08lx.\n", hr); ILockBytes_Release(ilb); data_object_format = &emf_fmt; hr = OleCreateStaticFromData(&DataObject, &IID_IOleObject, OLERENDER_FORMAT, &emf_fmt, NULL, storage, (void **)&ole_obj); - ok(hr == S_OK, "OleCreateStaticFromData failed: 0x%08x.\n", hr); + ok(hr == S_OK, "OleCreateStaticFromData failed: 0x%08lx.\n", hr); hr = IOleObject_QueryInterface(ole_obj, &IID_IPersist, (void **)&persist); - ok(hr == S_OK, "IOleObject_QueryInterface failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IOleObject_QueryInterface failed: 0x%08lx.\n", hr); hr = IPersist_GetClassID(persist, &clsid); - ok(hr == S_OK, "IPersist_GetClassID failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IPersist_GetClassID failed: 0x%08lx.\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_Picture_EnhMetafile), "Got wrong clsid: %s, expected: %s.\n", wine_dbgstr_guid(&clsid), wine_dbgstr_guid(&CLSID_Picture_EnhMetafile)); hr = IStorage_Stat(storage, &statstg, STATFLAG_NONAME); @@ -4585,28 +4585,28 @@ static void test_OleCreateStaticFromData(void)
/* CF_TEXT */ hr = CreateILockBytesOnHGlobal(NULL, TRUE, &ilb); - ok(hr == S_OK, "CreateILockBytesOnHGlobal failed: 0x%08x.\n", hr); + ok(hr == S_OK, "CreateILockBytesOnHGlobal failed: 0x%08lx.\n", hr); hr = StgCreateDocfileOnILockBytes(ilb, STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_READWRITE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfileOnILockBytes failed: 0x%08x.\n", hr); + ok(hr == S_OK, "StgCreateDocfileOnILockBytes failed: 0x%08lx.\n", hr); ILockBytes_Release(ilb); data_object_format = &text_fmt; hr = OleCreateStaticFromData(&DataObject, &IID_IOleObject, OLERENDER_FORMAT, &text_fmt, NULL, storage, (void **)&ole_obj); - ok(hr == DV_E_CLIPFORMAT, "OleCreateStaticFromData should fail: 0x%08x.\n", hr); + ok(hr == DV_E_CLIPFORMAT, "OleCreateStaticFromData should fail: 0x%08lx.\n", hr); IStorage_Release(storage);
hr = CreateILockBytesOnHGlobal(NULL, TRUE, &ilb); - ok(hr == S_OK, "CreateILockBytesOnHGlobal failed: 0x%08x.\n", hr); + ok(hr == S_OK, "CreateILockBytesOnHGlobal failed: 0x%08lx.\n", hr); hr = StgCreateDocfileOnILockBytes(ilb, STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_READWRITE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfileOnILockBytes failed: 0x%08x.\n", hr); + ok(hr == S_OK, "StgCreateDocfileOnILockBytes failed: 0x%08lx.\n", hr); ILockBytes_Release(ilb); data_object_format = &dib_fmt; expected_method_list = methods_create_from_dib; hr = OleCreateFromData(&DataObject, &IID_IOleObject, OLERENDER_FORMAT, &dib_fmt, NULL, storage, (void **)&ole_obj); - todo_wine ok(hr == DV_E_FORMATETC, "OleCreateFromData should failed: 0x%08x.\n", hr); + todo_wine ok(hr == DV_E_FORMATETC, "OleCreateFromData should failed: 0x%08lx.\n", hr); IStorage_Release(storage); }
diff --git a/dlls/ole32/tests/ole_server.c b/dlls/ole32/tests/ole_server.c index a5e0a334491..0e0473ad0f3 100644 --- a/dlls/ole32/tests/ole_server.c +++ b/dlls/ole32/tests/ole_server.c @@ -114,7 +114,7 @@ static ULONG WINAPI UnknownImpl_AddRef(IUnknown *iface)
InterlockedIncrement(&obj_ref);
- trace("server: unknown_AddRef: %p, ref %u\n", iface, ref); + trace("server: unknown_AddRef: %p, ref %lu\n", iface, ref); return ref; }
@@ -125,7 +125,7 @@ static ULONG WINAPI UnknownImpl_Release(IUnknown *iface)
InterlockedDecrement(&obj_ref);
- trace("server: unknown_Release: %p, ref %u\n", iface, ref); + trace("server: unknown_Release: %p, ref %lu\n", iface, ref); if (ref == 0) HeapFree(GetProcessHeap(), 0, This); return ref; } @@ -176,7 +176,7 @@ static ULONG WINAPI ClassFactoryImpl_AddRef(IClassFactory *iface)
InterlockedIncrement(&class_ref);
- trace("server: factory_AddRef: %p, ref %u\n", iface, ref); + trace("server: factory_AddRef: %p, ref %lu\n", iface, ref); return ref; }
@@ -187,7 +187,7 @@ static ULONG WINAPI ClassFactoryImpl_Release(IClassFactory *iface)
InterlockedDecrement(&class_ref);
- trace("server: factory_Release: %p, ref %u\n", iface, ref); + trace("server: factory_Release: %p, ref %lu\n", iface, ref); return ref; }
@@ -218,7 +218,7 @@ static HRESULT WINAPI ClassFactoryImpl_LockServer(IClassFactory *iface, BOOL loc { ULONG ref = lock ? InterlockedIncrement(&server_locks) : InterlockedDecrement(&server_locks);
- trace("server: factory_LockServer: %p,%d, ref %u\n", iface, lock, ref); + trace("server: factory_LockServer: %p,%d, ref %lu\n", iface, lock, ref); return S_OK; }
@@ -238,7 +238,7 @@ static void ole_server(void) HRESULT hr; DWORD key;
- trace("server: starting %u\n", GetCurrentProcessId()); + trace("server: starting %lu\n", GetCurrentProcessId());
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); if (hr == S_OK) @@ -251,9 +251,9 @@ static void ole_server(void) HANDLE done_event, init_done_event;
done_event = OpenEventA(SYNCHRONIZE, FALSE, "ole_server_done_event"); - ok(done_event != 0, "server: OpenEvent error %d\n", GetLastError()); + ok(done_event != 0, "server: OpenEvent error %ld\n", GetLastError()); init_done_event = OpenEventA(EVENT_MODIFY_STATE, FALSE, "ole_server_init_done_event"); - ok(init_done_event != 0, "server: OpenEvent error %d\n", GetLastError()); + ok(init_done_event != 0, "server: OpenEvent error %ld\n", GetLastError());
SetEvent(init_done_event);
@@ -261,9 +261,9 @@ static void ole_server(void) WaitForSingleObject(done_event, INFINITE);
/* 1 remainining class ref is supposed to be cleared by CoRevokeClassObject */ - ok(class_ref == 1, "expected 1 class refs, got %d\n", class_ref); - ok(!obj_ref, "expected 0 object refs, got %d\n", obj_ref); - ok(!server_locks, "expected 0 server locks, got %d\n", server_locks); + ok(class_ref == 1, "expected 1 class refs, got %ld\n", class_ref); + ok(!obj_ref, "expected 0 object refs, got %ld\n", obj_ref); + ok(!server_locks, "expected 0 server locks, got %ld\n", server_locks);
CloseHandle(done_event); CloseHandle(init_done_event); @@ -280,7 +280,7 @@ static void ole_server(void) trace("server: ret CoUninitialize\n"); }
- trace("server: exiting %u\n", GetCurrentProcessId()); + trace("server: exiting %lu\n", GetCurrentProcessId()); }
/******************************* OLE client *******************************/ @@ -303,12 +303,12 @@ static BOOL register_server(const char *server, BOOL inproc_handler) if (ret == ERROR_SUCCESS) { ret = RegSetValueA(root, "LocalServer32", REG_SZ, server_path, strlen(server_path)); - ok(ret == ERROR_SUCCESS, "RegSetValue error %u\n", ret); + ok(ret == ERROR_SUCCESS, "RegSetValue error %lu\n", ret);
if (inproc_handler) { ret = RegSetValueA(root, "InprocHandler32", REG_SZ, "ole32.dll", 9); - ok(ret == ERROR_SUCCESS, "RegSetValue error %u\n", ret); + ok(ret == ERROR_SUCCESS, "RegSetValue error %lu\n", ret); }
RegCloseKey(root); @@ -332,11 +332,11 @@ static void unregister_server(void) if (ret == ERROR_SUCCESS) { ret = RegDeleteKeyA(root, "InprocHandler32"); - ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret); + ok(ret == ERROR_SUCCESS, "RegDeleteKey error %lu\n", ret); ret = RegDeleteKeyA(root, "LocalServer32"); - ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret); + ok(ret == ERROR_SUCCESS, "RegDeleteKey error %lu\n", ret); ret = RegDeleteKeyA(root, ""); - ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret); + ok(ret == ERROR_SUCCESS, "RegDeleteKey error %lu\n", ret); RegCloseKey(root); } } @@ -362,7 +362,7 @@ static HANDLE start_server(const char *argv0)
sprintf(cmdline, ""%s" ole_server -server", argv0); ret = CreateProcessA(argv0, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); if (!ret) return 0;
CloseHandle(pi.hThread); @@ -390,9 +390,9 @@ START_TEST(ole_server) argc = winetest_get_mainargs(&argv);
done_event = CreateEventA(NULL, TRUE, FALSE, "ole_server_done_event"); - ok(done_event != 0, "CreateEvent error %d\n", GetLastError()); + ok(done_event != 0, "CreateEvent error %ld\n", GetLastError()); init_done_event = CreateEventA(NULL, TRUE, FALSE, "ole_server_init_done_event"); - ok(init_done_event != 0, "CreateEvent error %d\n", GetLastError()); + ok(init_done_event != 0, "CreateEvent error %ld\n", GetLastError());
if (argc > 2) { @@ -428,10 +428,10 @@ START_TEST(ole_server) WaitForSingleObject(init_done_event, 5000);
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - ok(hr == S_OK, "OleInitialize error %#x\n", hr); + ok(hr == S_OK, "OleInitialize error %#lx\n", hr);
hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void **)&unknown); - ok(hr == REGDB_E_CLASSNOTREG, "expected REGDB_E_CLASSNOTREG, got %#x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "expected REGDB_E_CLASSNOTREG, got %#lx\n", hr);
if (!register_server(argv[0], TRUE)) { @@ -443,13 +443,13 @@ START_TEST(ole_server) trace("call CoCreateInstance(&IID_NULL)\n"); hr = CoCreateInstance(&clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_NULL, (void **)&unknown); trace("ret CoCreateInstance(&IID_NULL)\n"); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr);
/* in-process handler supports IID_IUnknown starting from Vista */ trace("call CoCreateInstance(&IID_IUnknown)\n"); hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void **)&unknown); trace("ret CoCreateInstance(&IID_IUnknown)\n"); - ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG) /* XP,win2000 and earlier */, "CoCreateInstance(IID_IUnknown) error %#x\n", hr); + ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG) /* XP,win2000 and earlier */, "CoCreateInstance(IID_IUnknown) error %#lx\n", hr); if (hr != S_OK) { win_skip("In-process handler doesn't support IID_IUnknown on this platform\n"); @@ -459,92 +459,92 @@ START_TEST(ole_server) trace("call CoCreateInstance(&IID_IOleObject)\n"); hr = CoCreateInstance(&clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_IOleObject, (void **)&oleobj); trace("ret CoCreateInstance(&IID_IOleObject)\n"); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr);
trace("call IUnknown_QueryInterface(&IID_IRunnableObject)\n"); hr = IUnknown_QueryInterface(unknown, &IID_IRunnableObject, (void **)&runobj); trace("ret IUnknown_QueryInterface(&IID_IRunnableObject)\n"); - ok(hr == S_OK, "QueryInterface(&IID_IRunnableObject) error %#x\n", hr); + ok(hr == S_OK, "QueryInterface(&IID_IRunnableObject) error %#lx\n", hr);
ret = IRunnableObject_IsRunning(runobj); - ok(!ret, "expected 0, got %d\n", ret); + ok(!ret, "expected 0, got %ld\n", ret);
trace("call OleRun\n"); hr = OleRun(unknown); trace("ret OleRun\n"); todo_wine - ok(hr == S_OK, "OleRun error %#x\n", hr); + ok(hr == S_OK, "OleRun error %#lx\n", hr);
ret = IRunnableObject_IsRunning(runobj); todo_wine - ok(ret == 1, "expected 1, got %d\n", ret); + ok(ret == 1, "expected 1, got %ld\n", ret);
trace("call IRunnableObject_Release\n"); ret = IRunnableObject_Release(runobj); trace("ret IRunnableObject_Release\n"); - ok(ret == 1, "expected ref 1, got %u\n", ret); + ok(ret == 1, "expected ref 1, got %lu\n", ret);
trace("call IUnknown_QueryInterface(&IID_IOleObject)\n"); hr = IUnknown_QueryInterface(unknown, &IID_IOleObject, (void **)&oleobj); trace("ret IUnknown_QueryInterface(&IID_IOleObject)\n"); - ok(hr == S_OK, "QueryInterface(&IID_IOleObject) error %#x\n", hr); + ok(hr == S_OK, "QueryInterface(&IID_IOleObject) error %#lx\n", hr);
trace("call IOleObject_Release\n"); ret = IOleObject_Release(oleobj); trace("ret IOleObject_Release\n"); - ok(ret == 1, "expected ref 1, got %u\n", ret); + ok(ret == 1, "expected ref 1, got %lu\n", ret);
trace("call IUnknown_Release\n"); ret = IUnknown_Release(unknown); trace("ret IUnknown_Release\n"); - ok(!ret, "expected ref 0, got %u\n", ret); + ok(!ret, "expected ref 0, got %lu\n", ret);
test_local_server: /* local server supports IID_IUnknown */ trace("call CoCreateInstance(&IID_IUnknown)\n"); hr = CoCreateInstance(&clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_IUnknown, (void **)&unknown); trace("ret CoCreateInstance(&IID_IUnknown)\n"); - ok(hr == S_OK, "CoCreateInstance(IID_IUnknown) error %#x\n", hr); + ok(hr == S_OK, "CoCreateInstance(IID_IUnknown) error %#lx\n", hr);
trace("call IUnknown_QueryInterface(&IID_IRunnableObject)\n"); hr = IUnknown_QueryInterface(unknown, &IID_IRunnableObject, (void **)&runobj); trace("ret IUnknown_QueryInterface(&IID_IRunnableObject)\n"); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr);
trace("call OleRun\n"); hr = OleRun(unknown); trace("ret OleRun\n"); - ok(hr == S_OK, "OleRun error %#x\n", hr); + ok(hr == S_OK, "OleRun error %#lx\n", hr);
trace("call IUnknown_QueryInterface(&IID_IOleObject)\n"); hr = IUnknown_QueryInterface(unknown, &IID_IOleObject, (void **)&oleobj); trace("ret IUnknown_QueryInterface(&IID_IOleObject)\n"); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr);
trace("call IUnknown_Release\n"); ret = IUnknown_Release(unknown); trace("ret IUnknown_Release\n"); - ok(!ret, "expected ref 0, got %u\n", ret); + ok(!ret, "expected ref 0, got %lu\n", ret);
trace("call CoGetClassObject(&IID_IClassFactory)\n"); hr = CoGetClassObject(&clsid, CLSCTX_LOCAL_SERVER, NULL, &IID_IClassFactory, (void **)&factory); trace("ret CoGetClassObject(&IID_IClassFactory)\n"); - ok(hr == S_OK, "CoGetClassObject error %#x\n", hr); + ok(hr == S_OK, "CoGetClassObject error %#lx\n", hr);
trace("call IClassFactory_CreateInstance(&IID_NULL)\n"); hr = IClassFactory_CreateInstance(factory, NULL, &IID_NULL, (void **)&oleobj); trace("ret IClassFactory_CreateInstance(&IID_NULL)\n"); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr);
trace("call IClassFactory_CreateInstance(&IID_IOleObject)\n"); hr = IClassFactory_CreateInstance(factory, NULL, &IID_IOleObject, (void **)&oleobj); trace("ret IClassFactory_CreateInstance(&IID_IOleObject)\n"); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr);
trace("call IClassFactory_Release\n"); ret = IClassFactory_Release(factory); trace("ret IClassFactory_Release\n"); - ok(!ret, "expected ref 0, got %u\n", ret); + ok(!ret, "expected ref 0, got %lu\n", ret);
trace("signalling termination\n"); SetEvent(done_event); @@ -557,7 +557,7 @@ test_local_server:
if (info->child_failures) { - trace("%d failures in child process\n", info->child_failures); + trace("%ld failures in child process\n", info->child_failures); winetest_add_failures(info->child_failures); } } diff --git a/dlls/ole32/tests/propvariant.c b/dlls/ole32/tests/propvariant.c index 2b7e6d72851..01def6b15a8 100644 --- a/dlls/ole32/tests/propvariant.c +++ b/dlls/ole32/tests/propvariant.c @@ -162,17 +162,17 @@ static void expect(HRESULT hr, VARTYPE vt, BOOL copy, int line) if(flags == PROP_INV) { if (copy && (vt & VT_VECTOR)) - ok(hr == DISP_E_BADVARTYPE || hr == STG_E_INVALIDPARAMETER, "%s (%s): got %08x (line %d)\n", wine_vtypes[idx], modifier, hr, line); + ok(hr == DISP_E_BADVARTYPE || hr == STG_E_INVALIDPARAMETER, "%s (%s): got %08lx (line %d)\n", wine_vtypes[idx], modifier, hr, line); else - ok(hr == (copy ? DISP_E_BADVARTYPE : STG_E_INVALIDPARAMETER), "%s (%s): got %08x (line %d)\n", wine_vtypes[idx], modifier, hr, line); + ok(hr == (copy ? DISP_E_BADVARTYPE : STG_E_INVALIDPARAMETER), "%s (%s): got %08lx (line %d)\n", wine_vtypes[idx], modifier, hr, line); } else if(flags == PROP_V0) - ok(hr == S_OK, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr); + ok(hr == S_OK, "%s (%s): got %08lx\n", wine_vtypes[idx], modifier, hr); else todo_wine_if(flags & PROP_TODO) { if(hr != S_OK) win_skip("%s (%s): unsupported\n", wine_vtypes[idx], modifier); - else ok(hr == S_OK, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr); + else ok(hr == S_OK, "%s (%s): got %08lx\n", wine_vtypes[idx], modifier, hr); } }
@@ -186,9 +186,9 @@ static void test_validtypes(void)
memset(&propvar, 0x55, sizeof(propvar)); hr = PropVariantClear(&propvar); - ok(hr == STG_E_INVALIDPARAMETER, "expected STG_E_INVALIDPARAMETER, got %08x\n", hr); + ok(hr == STG_E_INVALIDPARAMETER, "expected STG_E_INVALIDPARAMETER, got %08lx\n", hr); ok(propvar.vt == 0, "expected 0, got %d\n", propvar.vt); - ok(U(propvar).uhVal.QuadPart == 0, "expected 0, got %#x/%#x\n", + ok(U(propvar).uhVal.QuadPart == 0, "expected 0, got %#lx/%#lx\n", U(propvar).uhVal.u.LowPart, U(propvar).uhVal.u.HighPart);
for (i = 0; i < ARRAY_SIZE(valid_types); i++) @@ -212,7 +212,7 @@ static void test_validtypes(void) if (hr == S_OK) { ok(copy.vt == propvar.vt, "expected %d, got %d\n", propvar.vt, copy.vt); - ok(U(copy).uhVal.QuadPart == U(propvar).uhVal.QuadPart, "%u: expected %#x/%#x, got %#x/%#x\n", + ok(U(copy).uhVal.QuadPart == U(propvar).uhVal.QuadPart, "%u: expected %#lx/%#lx, got %#lx/%#lx\n", i, U(propvar).uhVal.u.LowPart, U(propvar).uhVal.u.HighPart, U(copy).uhVal.u.LowPart, U(copy).uhVal.u.HighPart); } @@ -224,7 +224,7 @@ static void test_validtypes(void) hr = PropVariantClear(&propvar); expect(hr, vt, FALSE, __LINE__); ok(propvar.vt == 0, "expected 0, got %d\n", propvar.vt); - ok(U(propvar).uhVal.QuadPart == 0, "%u: expected 0, got %#x/%#x\n", + ok(U(propvar).uhVal.QuadPart == 0, "%u: expected 0, got %#lx/%#lx\n", i, U(propvar).uhVal.u.LowPart, U(propvar).uhVal.u.HighPart);
memset(&propvar, 0x55, sizeof(propvar)); @@ -236,7 +236,7 @@ static void test_validtypes(void) if (hr == S_OK) { ok(copy.vt == propvar.vt, "expected %d, got %d\n", propvar.vt, copy.vt); - ok(U(copy).uhVal.QuadPart == 0, "%u: expected 0, got %#x/%#x\n", + ok(U(copy).uhVal.QuadPart == 0, "%u: expected 0, got %#lx/%#lx\n", i, U(copy).uhVal.u.LowPart, U(copy).uhVal.u.HighPart); } else @@ -247,7 +247,7 @@ static void test_validtypes(void) hr = PropVariantClear(&propvar); expect(hr, vt, FALSE, __LINE__); ok(propvar.vt == 0, "expected 0, got %d\n", propvar.vt); - ok(U(propvar).uhVal.QuadPart == 0, "%u: expected 0, got %#x/%#x\n", + ok(U(propvar).uhVal.QuadPart == 0, "%u: expected 0, got %#lx/%#lx\n", i, U(propvar).uhVal.u.LowPart, U(propvar).uhVal.u.HighPart);
memset(&propvar, 0x55, sizeof(propvar)); @@ -260,7 +260,7 @@ static void test_validtypes(void) if (hr == S_OK) { ok(copy.vt == propvar.vt, "expected %d, got %d\n", propvar.vt, copy.vt); - ok(!U(copy).caub.cElems, "%u: expected 0, got %d\n", i, U(copy).caub.cElems); + ok(!U(copy).caub.cElems, "%u: expected 0, got %ld\n", i, U(copy).caub.cElems); ok(!U(copy).caub.pElems, "%u: expected NULL, got %p\n", i, U(copy).caub.pElems); } else @@ -271,7 +271,7 @@ static void test_validtypes(void) hr = PropVariantClear(&propvar); expect(hr, vt, FALSE, __LINE__); ok(propvar.vt == 0, "expected 0, got %d\n", propvar.vt); - ok(U(propvar).uhVal.QuadPart == 0, "%u: expected 0, got %#x/%#x\n", + ok(U(propvar).uhVal.QuadPart == 0, "%u: expected 0, got %#lx/%#lx\n", i, U(propvar).uhVal.u.LowPart, U(propvar).uhVal.u.HighPart);
memset(&propvar, 0x55, sizeof(propvar)); @@ -283,7 +283,7 @@ static void test_validtypes(void) if (hr == S_OK) { ok(copy.vt == propvar.vt, "expected %d, got %d\n", propvar.vt, copy.vt); - ok(U(copy).uhVal.QuadPart == U(propvar).uhVal.QuadPart, "%u: expected %#x/%#x, got %#x/%#x\n", + ok(U(copy).uhVal.QuadPart == U(propvar).uhVal.QuadPart, "%u: expected %#lx/%#lx, got %#lx/%#lx\n", i, U(propvar).uhVal.u.LowPart, U(propvar).uhVal.u.HighPart, U(copy).uhVal.u.LowPart, U(copy).uhVal.u.HighPart); } @@ -295,7 +295,7 @@ static void test_validtypes(void) hr = PropVariantClear(&propvar); expect(hr, vt, FALSE, __LINE__); ok(propvar.vt == 0, "expected 0, got %d\n", propvar.vt); - ok(U(propvar).uhVal.QuadPart == 0, "%u: expected 0, got %#x/%#x\n", + ok(U(propvar).uhVal.QuadPart == 0, "%u: expected 0, got %#lx/%#lx\n", i, U(propvar).uhVal.u.LowPart, U(propvar).uhVal.u.HighPart); } } @@ -371,14 +371,14 @@ static void test_copy(void) propvarSrc.vt = VT_BSTR; U(propvarSrc).bstrVal = SysAllocStringLen(L"Test Str\0ing", 12); hr = PropVariantCopy(&propvarDst, &propvarSrc); - ok(hr == S_OK, "Failed to copy propvar, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy propvar, hr %#lx.\n", hr); ok(SysStringLen(U(propvarDst).bstrVal) == 8, "Unexpected copy length.\n"); ok(SysStringLen(U(propvarSrc).bstrVal) == 12, "Unexpected source length.\n"); ok(!lstrcmpW(U(propvarSrc).bstrVal, U(propvarDst).bstrVal), "BSTR not copied properly\n"); hr = PropVariantClear(&propvarSrc); - ok(hr == S_OK, "Failed to clear propvar, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear propvar, hr %#lx.\n", hr); hr = PropVariantClear(&propvarDst); - ok(hr == S_OK, "Failed to clear propvar, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear propvar, hr %#lx.\n", hr);
propvarSrc.vt = VT_LPWSTR; U(propvarSrc).pwszVal = wszTestString; @@ -401,12 +401,12 @@ static void test_copy(void) propvarSrc.vt = VT_UNKNOWN; U(propvarSrc).punkVal = &unk_obj.IUnknown_iface; hr = PropVariantCopy(&propvarDst, &propvarSrc); - ok(hr == S_OK, "PropVariantCopy(...VT_UNKNOWN...) failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantCopy(...VT_UNKNOWN...) failed: 0x%08lx.\n", hr); ok(U(propvarDst).punkVal == &unk_obj.IUnknown_iface, "Got wrong IUnknown pointer\n"); - ok(unk_obj.ref == 2, "got wrong refcount: %d.\n", unk_obj.ref); + ok(unk_obj.ref == 2, "got wrong refcount: %ld.\n", unk_obj.ref); hr = PropVariantClear(&propvarDst); - ok(hr == S_OK, "PropVariantClear(...VT_UNKNOWN...) failed: 0x%08x.\n", hr); - ok(unk_obj.ref == 1, "got wrong refcount: %d.\n", unk_obj.ref); + ok(hr == S_OK, "PropVariantClear(...VT_UNKNOWN...) failed: 0x%08lx.\n", hr); + ok(unk_obj.ref == 1, "got wrong refcount: %ld.\n", unk_obj.ref); memset(&propvarSrc, 0, sizeof(propvarSrc));
sabound.lLbound = 0; @@ -416,19 +416,19 @@ static void test_copy(void) SafeArrayPutElement(sa, &saindex, &unk_obj.IUnknown_iface); saindex = 1; SafeArrayPutElement(sa, &saindex, &unk_obj.IUnknown_iface); - ok(unk_obj.ref == 3, "got wrong refcount: %d.\n", unk_obj.ref); + ok(unk_obj.ref == 3, "got wrong refcount: %ld.\n", unk_obj.ref);
propvarSrc.vt = VT_ARRAY | VT_UNKNOWN; U(propvarSrc).parray = sa; hr = PropVariantCopy(&propvarDst, &propvarSrc); - ok(hr == S_OK, "PropVariantCopy(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08x.\n", hr); - ok(unk_obj.ref == 5, "got wrong refcount: %d.\n", unk_obj.ref); + ok(hr == S_OK, "PropVariantCopy(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08lx.\n", hr); + ok(unk_obj.ref == 5, "got wrong refcount: %ld.\n", unk_obj.ref); hr = PropVariantClear(&propvarDst); - ok(hr == S_OK, "PropVariantClear(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08x.\n", hr); - ok(unk_obj.ref == 3, "got wrong refcount: %d.\n", unk_obj.ref); + ok(hr == S_OK, "PropVariantClear(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08lx.\n", hr); + ok(unk_obj.ref == 3, "got wrong refcount: %ld.\n", unk_obj.ref); hr = PropVariantClear(&propvarSrc); - ok(hr == S_OK, "PropVariantClear(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08x.\n", hr); - ok(unk_obj.ref == 1, "got wrong refcount: %d.\n", unk_obj.ref); + ok(hr == S_OK, "PropVariantClear(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08lx.\n", hr); + ok(unk_obj.ref == 1, "got wrong refcount: %ld.\n", unk_obj.ref); memset(&propvarSrc, 0, sizeof(propvarSrc)); }
@@ -570,7 +570,7 @@ static void test_propertytovariant(void)
ok(ret == 0, "StgConvertPropertyToVariant returned %i\n", ret); ok(propvar.vt == VT_I4, "unexpected vt %x\n", propvar.vt); - ok(U(propvar).lVal == 0xfeabcdef, "unexpected lVal %x\n", U(propvar).lVal); + ok(U(propvar).lVal == 0xfeabcdef, "unexpected lVal %lx\n", U(propvar).lVal);
ret = pStgConvertPropertyToVariant((SERIALIZEDPROPERTYVALUE*)serialized_bstr_wc, CP_WINUNICODE, &propvar, &allocator); @@ -622,7 +622,7 @@ static void test_varianttoproperty(void) 0, FALSE, 0);
ok(propvalue == NULL, "got nonnull propvalue\n"); - todo_wine ok(len == 8, "unexpected length %d\n", len); + todo_wine ok(len == 8, "unexpected length %ld\n", len);
if (len == 0xdeadbeef) { @@ -635,7 +635,7 @@ static void test_varianttoproperty(void) 0, FALSE, 0);
ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); - ok(len == 8, "unexpected length %d\n", len); + ok(len == 8, "unexpected length %ld\n", len); ok(!memcmp(propvalue, serialized_i4, 8), "got wrong data\n");
propvar.vt = VT_EMPTY; @@ -645,9 +645,9 @@ static void test_varianttoproperty(void) 0, FALSE, 0);
ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); - ok(len == 4 || broken(len == 0) /* before Vista */, "unexpected length %d\n", len); + ok(len == 4 || broken(len == 0) /* before Vista */, "unexpected length %ld\n", len); if (len) ok(!memcmp(propvalue, serialized_empty, 4), "got wrong data\n"); - else ok(propvalue->dwType == 0xdeadbeef, "unexpected type %d\n", propvalue->dwType); + else ok(propvalue->dwType == 0xdeadbeef, "unexpected type %ld\n", propvalue->dwType);
propvar.vt = VT_NULL; len = 20; @@ -655,7 +655,7 @@ static void test_varianttoproperty(void) 0, FALSE, 0);
ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); - ok(len == 4, "unexpected length %d\n", len); + ok(len == 4, "unexpected length %ld\n", len); ok(!memcmp(propvalue, serialized_null, 4), "got wrong data\n");
test_string_bstr = SysAllocString(test_string); @@ -667,7 +667,7 @@ static void test_varianttoproperty(void) 0, FALSE, 0);
ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); - ok(len == 20, "unexpected length %d\n", len); + ok(len == 20, "unexpected length %ld\n", len); ok(!memcmp(propvalue, serialized_bstr_wc, 20), "got wrong data\n");
len = 20; @@ -675,7 +675,7 @@ static void test_varianttoproperty(void) 0, FALSE, 0);
ok(propvalue == own_propvalue, "unexpected propvalue %p\n", propvalue); - ok(len == 16, "unexpected length %d\n", len); + ok(len == 16, "unexpected length %ld\n", len); ok(!memcmp(propvalue, serialized_bstr_mb, 16), "got wrong data\n");
SysFreeString(test_string_bstr); diff --git a/dlls/ole32/tests/stg_prop.c b/dlls/ole32/tests/stg_prop.c index 967a1788333..6298c7ba9f9 100644 --- a/dlls/ole32/tests/stg_prop.c +++ b/dlls/ole32/tests/stg_prop.c @@ -59,34 +59,34 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage)
hr = StgCreateDocfile(filename, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr);
if(propSetStorage) { hr = StgCreatePropSetStg(storage, 0, propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
hr = IPropertySetStorage_Create(*propSetStorage, &FMTID_SummaryInformation, NULL, PROPSETFLAG_ANSI, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr); + ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08lx\n", hr); } else { hr = IStorage_CreateStream(storage, szSummaryInfo, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stream); - ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08lx\n", hr);
hr = StgCreatePropStg((IUnknown *)stream, &FMTID_SummaryInformation, NULL, PROPSETFLAG_ANSI, 0, &propertyStorage); - ok(hr == S_OK, "StgCreatePropStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreatePropStg failed: 0x%08lx\n", hr); }
hr = IPropertyStorage_WriteMultiple(propertyStorage, 0, NULL, NULL, 0); - ok(hr == S_OK, "WriteMultiple with 0 args failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple with 0 args failed: 0x%08lx\n", hr); hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, NULL, NULL, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr);
/* test setting one that I can't set */ spec.ulKind = PRSPEC_PROPID; @@ -95,7 +95,7 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) U(var).lVal = 1; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); + "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
/* test setting one by name with an invalid propidNameFirst */ spec.ulKind = PRSPEC_LPWSTR; @@ -103,7 +103,7 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, PID_DICTIONARY); ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); + "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
/* test setting behavior (case-sensitive) */ spec.ulKind = PRSPEC_PROPID; @@ -111,14 +111,14 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) U(var).lVal = 1; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); + "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
/* set one by value.. */ spec.ulKind = PRSPEC_PROPID; U(spec).propid = PID_FIRST_USABLE; U(var).lVal = 1; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
/* set one by name */ spec.ulKind = PRSPEC_LPWSTR; @@ -126,7 +126,7 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) U(var).lVal = 2; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, PID_FIRST_USABLE); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
/* set a string value */ spec.ulKind = PRSPEC_PROPID; @@ -134,7 +134,7 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) var.vt = VT_LPSTR; U(var).pszVal = val; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
/* set a clipboard value */ spec.ulKind = PRSPEC_PROPID; @@ -145,35 +145,35 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) clipdata.pClipData = clipcontent; U(var).pclipdata = &clipdata; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
/* check reading */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 0, NULL, NULL); - ok(hr == S_FALSE, "ReadMultiple with 0 args failed: 0x%08x\n", hr); + ok(hr == S_FALSE, "ReadMultiple with 0 args failed: 0x%08lx\n", hr); hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr); /* read by propid */ spec.ulKind = PRSPEC_PROPID; U(spec).propid = PID_FIRST_USABLE; hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_I4 && U(var).lVal == 1, - "Didn't get expected type or value for property (got type %d, value %d)\n", + "Didn't get expected type or value for property (got type %d, value %ld)\n", var.vt, U(var).lVal); /* read by name */ spec.ulKind = PRSPEC_LPWSTR; U(spec).lpwstr = propName; hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_I4 && U(var).lVal == 2, - "Didn't get expected type or value for property (got type %d, value %d)\n", + "Didn't get expected type or value for property (got type %d, value %ld)\n", var.vt, U(var).lVal); /* read string value */ spec.ulKind = PRSPEC_PROPID; U(spec).propid = PIDSI_AUTHOR; hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_LPSTR && !lstrcmpA(U(var).pszVal, val), "Didn't get expected type or value for property (got type %d, value %s)\n", var.vt, U(var).pszVal); @@ -183,7 +183,7 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) spec.ulKind = PRSPEC_PROPID; U(spec).propid = PIDSI_THUMBNAIL; hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_CF, "variant type wrong\n"); ok(U(var).pclipdata->ulClipFmt == CF_ENHMETAFILE, "clipboard type wrong\n"); @@ -195,54 +195,54 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage)
/* check deleting */ hr = IPropertyStorage_DeleteMultiple(propertyStorage, 0, NULL); - ok(hr == S_OK, "DeleteMultiple with 0 args failed: 0x%08x\n", hr); + ok(hr == S_OK, "DeleteMultiple with 0 args failed: 0x%08lx\n", hr); hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr); /* contrary to what the docs say, you can't delete the dictionary */ spec.ulKind = PRSPEC_PROPID; U(spec).propid = PID_DICTIONARY; hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, &spec); ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); + "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr); /* now delete the first value.. */ U(spec).propid = PID_FIRST_USABLE; hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, &spec); - ok(hr == S_OK, "DeleteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "DeleteMultiple failed: 0x%08lx\n", hr); /* and check that it's no longer readable */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08lx\n", hr);
hr = IPropertyStorage_Commit(propertyStorage, STGC_DEFAULT); - ok(hr == S_OK, "Commit failed: 0x%08x\n", hr); + ok(hr == S_OK, "Commit failed: 0x%08lx\n", hr);
/* check reverting */ spec.ulKind = PRSPEC_PROPID; U(spec).propid = PID_FIRST_USABLE; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); hr = IPropertyStorage_Revert(propertyStorage); - ok(hr == S_OK, "Revert failed: 0x%08x\n", hr); + ok(hr == S_OK, "Revert failed: 0x%08lx\n", hr); /* now check that it's still not there */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08x\n", hr); + ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08lx\n", hr); /* set an integer value again */ spec.ulKind = PRSPEC_PROPID; U(spec).propid = PID_FIRST_USABLE; var.vt = VT_I4; U(var).lVal = 1; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); /* commit it */ hr = IPropertyStorage_Commit(propertyStorage, STGC_DEFAULT); - ok(hr == S_OK, "Commit failed: 0x%08x\n", hr); + ok(hr == S_OK, "Commit failed: 0x%08lx\n", hr); /* set it to a string value */ var.vt = VT_LPSTR; U(var).pszVal = val; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); /* revert it */ hr = IPropertyStorage_Revert(propertyStorage); - ok(hr == S_OK, "Revert failed: 0x%08x\n", hr); + ok(hr == S_OK, "Revert failed: 0x%08lx\n", hr); /* Oddly enough, there's no guarantee that a successful revert actually * implies the value wasn't saved. Maybe transactional mode needs to be * used for that? @@ -256,40 +256,40 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) /* now open it again */ hr = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &storage); - ok(hr == S_OK, "StgOpenStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgOpenStorage failed: 0x%08lx\n", hr);
if(propSetStorage) { hr = StgCreatePropSetStg(storage, 0, propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
hr = IPropertySetStorage_Open(*propSetStorage, &FMTID_SummaryInformation, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr); + ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08lx\n", hr); } else { hr = IStorage_OpenStream(storage, szSummaryInfo, 0, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stream); - ok(hr == S_OK, "IStorage_OpenStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_OpenStream failed: 0x%08lx\n", hr);
hr = StgOpenPropStg((IUnknown *)stream, &FMTID_SummaryInformation, PROPSETFLAG_DEFAULT, 0, &propertyStorage); - ok(hr == S_OK, "StgOpenPropStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgOpenPropStg failed: 0x%08lx\n", hr); }
/* check properties again */ spec.ulKind = PRSPEC_LPWSTR; U(spec).lpwstr = propName; hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_I4 && U(var).lVal == 2, - "Didn't get expected type or value for property (got type %d, value %d)\n", + "Didn't get expected type or value for property (got type %d, value %ld)\n", var.vt, U(var).lVal); spec.ulKind = PRSPEC_PROPID; U(spec).propid = PIDSI_AUTHOR; hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_LPSTR && !lstrcmpA(U(var).pszVal, val), "Didn't get expected type or value for property (got type %d, value %s)\n", var.vt, U(var).pszVal); @@ -305,28 +305,28 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) /* Test creating a property set storage with a random GUID */ hr = StgCreateDocfile(filename, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr);
if(propSetStorage) { hr = StgCreatePropSetStg(storage, 0, propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
hr = IPropertySetStorage_Create(*propSetStorage, &anyOldGuid, NULL, PROPSETFLAG_ANSI, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr); + ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08lx\n", hr); } else { hr = IStorage_CreateStream(storage, szSummaryInfo, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stream); - ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08lx\n", hr);
hr = StgCreatePropStg((IUnknown *)stream, &anyOldGuid, NULL, PROPSETFLAG_DEFAULT, 0, &propertyStorage); - ok(hr == S_OK, "StgCreatePropStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreatePropStg failed: 0x%08lx\n", hr); }
spec.ulKind = PRSPEC_PROPID; @@ -334,10 +334,10 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) var.vt = VT_I4; U(var).lVal = 1; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr);
hr = IPropertyStorage_Commit(propertyStorage, STGC_DEFAULT); - ok(hr == S_OK, "Commit failed: 0x%08x\n", hr); + ok(hr == S_OK, "Commit failed: 0x%08lx\n", hr);
IPropertyStorage_Release(propertyStorage); if(propSetStorage) IPropertySetStorage_Release(*propSetStorage); @@ -347,35 +347,35 @@ static void testPropsHelper(IPropertySetStorage **propSetStorage) /* now open it again */ hr = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &storage); - ok(hr == S_OK, "StgOpenStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgOpenStorage failed: 0x%08lx\n", hr);
if(propSetStorage) { hr = StgCreatePropSetStg(storage, 0, propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
hr = IPropertySetStorage_Open(*propSetStorage, &anyOldGuid, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr); + ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08lx\n", hr); } else { hr = IStorage_OpenStream(storage, szSummaryInfo, 0, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stream); - ok(hr == S_OK, "IStorage_OpenStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_OpenStream failed: 0x%08lx\n", hr);
hr = StgOpenPropStg((IUnknown *)stream, &anyOldGuid, PROPSETFLAG_DEFAULT, 0, &propertyStorage); - ok(hr == S_OK, "StgOpenPropStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgOpenPropStg failed: 0x%08lx\n", hr); }
spec.ulKind = PRSPEC_PROPID; U(spec).propid = PID_FIRST_USABLE; hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr);
ok(var.vt == VT_I4 && U(var).lVal == 1, - "Didn't get expected type or value for property (got type %d, value %d)\n", + "Didn't get expected type or value for property (got type %d, value %ld)\n", var.vt, U(var).lVal);
IPropertyStorage_Release(propertyStorage); @@ -413,42 +413,42 @@ static void testCodepage(void)
hr = StgCreateDocfile(fileName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr);
hr = StgCreatePropSetStg(storage, 0, &propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
hr = IPropertySetStorage_Create(propSetStorage, &FMTID_SummaryInformation, NULL, PROPSETFLAG_DEFAULT, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr); + ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08lx\n", hr);
PropVariantInit(&var); spec.ulKind = PRSPEC_PROPID; U(spec).propid = PID_CODEPAGE; /* check code page before it's been explicitly set */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_I2 && U(var).iVal == 1200, "Didn't get expected type or value for property\n"); /* Set the code page to ascii */ var.vt = VT_I2; U(var).iVal = 1252; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); /* check code page */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_I2 && U(var).iVal == 1252, "Didn't get expected type or value for property\n"); /* Set code page to Unicode */ U(var).iVal = 1200; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); /* check code page */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_I2 && U(var).iVal == 1200, "Didn't get expected type or value for property\n"); /* Set a string value */ @@ -457,9 +457,9 @@ static void testCodepage(void) var.vt = VT_LPSTR; U(var).pszVal = aval; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, "hi"), "Didn't get expected type or value for property\n"); PropVariantClear(&var); @@ -471,9 +471,9 @@ static void testCodepage(void) var.vt = VT_LPSTR; U(var).pszVal = (LPSTR)wval; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, "h"), "Didn't get expected type or value for property\n"); PropVariantClear(&var); @@ -485,7 +485,7 @@ static void testCodepage(void) U(var).iVal = 1200; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); + "Expected STG_E_INVALIDPARAMETER, got 0x%08lx\n", hr);
IPropertyStorage_Release(propertyStorage); IPropertySetStorage_Release(propSetStorage); @@ -496,28 +496,28 @@ static void testCodepage(void) /* same tests, but with PROPSETFLAG_ANSI */ hr = StgCreateDocfile(fileName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr);
hr = StgCreatePropSetStg(storage, 0, &propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08lx\n", hr);
hr = IPropertySetStorage_Create(propSetStorage, &FMTID_SummaryInformation, NULL, PROPSETFLAG_ANSI, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr); + ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08lx\n", hr);
/* check code page before it's been explicitly set */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_I2, "Didn't get expected type for property (%u)\n", var.vt); /* Set code page to Unicode */ U(var).iVal = 1200; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); /* check code page */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_I2 && U(var).iVal == 1200, "Didn't get expected type or value for property\n"); /* This test is commented out for documentation. It fails under Wine, @@ -529,7 +529,7 @@ static void testCodepage(void) /* Set code page to 950 (Traditional Chinese) */ U(var).iVal = 950; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); /* Try writing an invalid string: lead byte 0x81 is unused in Traditional * Chinese. */ @@ -538,10 +538,10 @@ static void testCodepage(void) var.vt = VT_LPSTR; U(var).pszVal = (LPSTR)strVal; hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "WriteMultiple failed: 0x%08lx\n", hr); /* Check returned string */ hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); + ok(hr == S_OK, "ReadMultiple failed: 0x%08lx\n", hr); ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, (LPCSTR)strVal), "Didn't get expected type or value for property\n"); } @@ -568,57 +568,57 @@ static void testFmtId(void) HRESULT hr;
hr = FmtIdToPropStgName(NULL, name); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr); hr = FmtIdToPropStgName(&FMTID_SummaryInformation, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr); hr = FmtIdToPropStgName(&FMTID_SummaryInformation, name); - ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr); + ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08lx\n", hr); ok(!memcmp(name, szSummaryInfo, (lstrlenW(szSummaryInfo) + 1) * sizeof(WCHAR)), "Got wrong name for FMTID_SummaryInformation\n"); hr = FmtIdToPropStgName(&FMTID_DocSummaryInformation, name); - ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr); + ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08lx\n", hr); ok(!memcmp(name, szDocSummaryInfo, (lstrlenW(szDocSummaryInfo) + 1) * sizeof(WCHAR)), "Got wrong name for FMTID_DocSummaryInformation\n"); hr = FmtIdToPropStgName(&FMTID_UserDefinedProperties, name); - ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr); + ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08lx\n", hr); ok(!memcmp(name, szDocSummaryInfo, (lstrlenW(szDocSummaryInfo) + 1) * sizeof(WCHAR)), "Got wrong name for FMTID_DocSummaryInformation\n"); hr = FmtIdToPropStgName(&IID_IPropertySetStorage, name); - ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr); + ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08lx\n", hr); ok(!memcmp(name, szIID_IPropSetStg, (lstrlenW(szIID_IPropSetStg) + 1) * sizeof(WCHAR)), "Got wrong name for IID_IPropertySetStorage\n");
/* test args first */ hr = PropStgNameToFmtId(NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr); hr = PropStgNameToFmtId(NULL, &fmtid); - ok(hr == STG_E_INVALIDNAME, "Expected STG_E_INVALIDNAME, got 0x%08x\n", + ok(hr == STG_E_INVALIDNAME, "Expected STG_E_INVALIDNAME, got 0x%08lx\n", hr); hr = PropStgNameToFmtId(szDocSummaryInfo, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08lx\n", hr); /* test the known format IDs */ hr = PropStgNameToFmtId(szSummaryInfo, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); + ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr); ok(!memcmp(&fmtid, &FMTID_SummaryInformation, sizeof(fmtid)), "Got unexpected FMTID, expected FMTID_SummaryInformation\n"); hr = PropStgNameToFmtId(szDocSummaryInfo, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); + ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr); ok(!memcmp(&fmtid, &FMTID_DocSummaryInformation, sizeof(fmtid)), "Got unexpected FMTID, expected FMTID_DocSummaryInformation\n"); /* test another GUID */ hr = PropStgNameToFmtId(szIID_IPropSetStg, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); + ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr); ok(!memcmp(&fmtid, &IID_IPropertySetStorage, sizeof(fmtid)), "Got unexpected FMTID, expected IID_IPropertySetStorage\n"); /* now check case matching */ CharUpperW(szDocSummaryInfo + 1); hr = PropStgNameToFmtId(szDocSummaryInfo, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); + ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr); ok(!memcmp(&fmtid, &FMTID_DocSummaryInformation, sizeof(fmtid)), "Got unexpected FMTID, expected FMTID_DocSummaryInformation\n"); CharUpperW(szIID_IPropSetStg + 1); hr = PropStgNameToFmtId(szIID_IPropSetStg, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); + ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08lx\n", hr); ok(!memcmp(&fmtid, &IID_IPropertySetStorage, sizeof(fmtid)), "Got unexpected FMTID, expected IID_IPropertySetStorage\n"); } @@ -639,91 +639,91 @@ static void test_propertyset_storage_enum(void) ok(ret, "Failed to get temporary file name.\n");
hr = StgCreateDocfile(filename, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "Failed to crate storage, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to crate storage, hr %#lx.\n", hr);
hr = StgCreatePropSetStg(storage, 0, &ps_storage); - ok(hr == S_OK, "Failed to create property set storage, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create property set storage, hr %#lx.\n", hr);
hr = IPropertySetStorage_Create(ps_storage, &FMTID_SummaryInformation, &IID_IUnknown, PROPSETFLAG_ANSI, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, &prop_storage); - ok(hr == S_OK, "Failed to create property storage, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create property storage, hr %#lx.\n", hr);
hr = IPropertyStorage_Stat(prop_storage, &psstg); - ok(hr == S_OK, "Failed to get prop storage stats, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get prop storage stats, hr %#lx.\n", hr); todo_wine ok(IsEqualCLSID(&psstg.clsid, &IID_IUnknown), "Unexpected storage clsid %s.\n", wine_dbgstr_guid(&psstg.clsid));
hr = IPropertySetStorage_Enum(ps_storage, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IPropertySetStorage_Enum(ps_storage, &ps_enum); - ok(hr == S_OK, "Failed to get enum object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get enum object, hr %#lx.\n", hr);
memset(&psstg, 0, sizeof(psstg)); hr = IEnumSTATPROPSETSTG_Next(ps_enum, 1, &psstg, &fetched); - ok(hr == S_OK, "Failed to get enum item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get enum item, hr %#lx.\n", hr); ok(fetched == 1, "Unexpected fetched count.\n"); ok(IsEqualCLSID(&psstg.fmtid, &FMTID_SummaryInformation), "Unexpected fmtid %s.\n", wine_dbgstr_guid(&psstg.fmtid)); - ok(psstg.mtime.dwHighDateTime == 0 && psstg.mtime.dwLowDateTime == 0, "Unexpected mtime %#x / %#x.\n", + ok(psstg.mtime.dwHighDateTime == 0 && psstg.mtime.dwLowDateTime == 0, "Unexpected mtime %#lx / %#lx.\n", psstg.mtime.dwHighDateTime, psstg.mtime.dwLowDateTime);
memset(&ftime, 0, sizeof(ftime)); ftime.dwLowDateTime = 1; hr = IPropertyStorage_SetTimes(prop_storage, NULL, NULL, &ftime); todo_wine - ok(hr == S_OK, "Failed to set storage times, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set storage times, hr %#lx.\n", hr);
hr = IEnumSTATPROPSETSTG_Reset(ps_enum); - ok(hr == S_OK, "Failed to reset enumerator, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to reset enumerator, hr %#lx.\n", hr); memset(&psstg, 0, sizeof(psstg)); hr = IEnumSTATPROPSETSTG_Next(ps_enum, 1, &psstg, &fetched); - ok(hr == S_OK, "Failed to get enum item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get enum item, hr %#lx.\n", hr); ok(fetched == 1, "Unexpected fetched count.\n"); ok(IsEqualCLSID(&psstg.fmtid, &FMTID_SummaryInformation), "Unexpected fmtid %s.\n", wine_dbgstr_guid(&psstg.fmtid)); - ok(psstg.mtime.dwHighDateTime == 0 && psstg.mtime.dwLowDateTime == 0, "Unexpected mtime %#x / %#x.\n", + ok(psstg.mtime.dwHighDateTime == 0 && psstg.mtime.dwLowDateTime == 0, "Unexpected mtime %#lx / %#lx.\n", psstg.mtime.dwHighDateTime, psstg.mtime.dwLowDateTime); hr = IEnumSTATPROPSETSTG_Next(ps_enum, 1, &psstg, &fetched); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IPropertySetStorage_Create(ps_storage, &FMTID_SummaryInformation, &IID_IUnknown, PROPSETFLAG_ANSI, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, &prop_storage2); - ok(hr == S_OK, "Failed to create property storage, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create property storage, hr %#lx.\n", hr);
hr = IEnumSTATPROPSETSTG_Reset(ps_enum); - ok(hr == S_OK, "Failed to reset enumerator, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to reset enumerator, hr %#lx.\n", hr); hr = IEnumSTATPROPSETSTG_Next(ps_enum, 1, &psstg, &fetched); - ok(hr == S_OK, "Failed to get enum item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get enum item, hr %#lx.\n", hr); ok(fetched == 1, "Unexpected fetched count.\n"); hr = IEnumSTATPROPSETSTG_Next(ps_enum, 1, &psstg, &fetched); - ok(hr == S_FALSE, "Failed to get enum item, hr %#x.\n", hr); + ok(hr == S_FALSE, "Failed to get enum item, hr %#lx.\n", hr);
/* Skipping. */ hr = IEnumSTATPROPSETSTG_Reset(ps_enum); - ok(hr == S_OK, "Failed to reset enumerator, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to reset enumerator, hr %#lx.\n", hr); hr = IEnumSTATPROPSETSTG_Skip(ps_enum, 2); todo_wine - ok(hr == S_FALSE, "Failed to skip, hr %#x.\n", hr); + ok(hr == S_FALSE, "Failed to skip, hr %#lx.\n", hr); hr = IEnumSTATPROPSETSTG_Next(ps_enum, 1, &psstg, &fetched); todo_wine - ok(hr == S_FALSE, "Failed to get enum item, hr %#x.\n", hr); + ok(hr == S_FALSE, "Failed to get enum item, hr %#lx.\n", hr);
hr = IEnumSTATPROPSETSTG_Reset(ps_enum); - ok(hr == S_OK, "Failed to reset enumerator, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to reset enumerator, hr %#lx.\n", hr); hr = IEnumSTATPROPSETSTG_Skip(ps_enum, 1); - ok(hr == S_OK, "Failed to skip, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to skip, hr %#lx.\n", hr); hr = IEnumSTATPROPSETSTG_Next(ps_enum, 1, &psstg, &fetched); todo_wine - ok(hr == S_FALSE, "Failed to get enum item, hr %#x.\n", hr); + ok(hr == S_FALSE, "Failed to get enum item, hr %#lx.\n", hr);
hr = IEnumSTATPROPSETSTG_Reset(ps_enum); - ok(hr == S_OK, "Failed to reset enumerator, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to reset enumerator, hr %#lx.\n", hr); todo_wine { hr = IEnumSTATPROPSETSTG_Skip(ps_enum, 0); - ok(hr == S_FALSE, "Failed to skip, hr %#x.\n", hr); + ok(hr == S_FALSE, "Failed to skip, hr %#lx.\n", hr); hr = IEnumSTATPROPSETSTG_Next(ps_enum, 1, &psstg, &fetched); - ok(hr == S_FALSE, "Failed to get enum item, hr %#x.\n", hr); + ok(hr == S_FALSE, "Failed to get enum item, hr %#lx.\n", hr); } IEnumSTATPROPSETSTG_Release(ps_enum);
diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index 9f4311cd07c..58cf91b0d92 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -33,7 +33,7 @@
DEFINE_GUID( test_stg_cls, 0x88888888, 0x0425, 0x0000, 0,0,0,0,0,0,0,0);
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
static CHAR filenameA[MAX_PATH]; static WCHAR filename[MAX_PATH]; @@ -250,7 +250,7 @@ static void CreateTestLockBytes(TestLockBytes **This) static void DeleteTestLockBytes(TestLockBytes *This) { ok(This->ILockBytes_iface.lpVtbl == &TestLockBytes_Vtbl, "test lock bytes %p deleted with incorrect vtable\n", This); - ok(This->ref == 1, "test lock bytes %p deleted with %i references instead of 1\n", This, This->ref); + ok(This->ref == 1, "test lock bytes %p deleted with %li references instead of 1\n", This, This->ref); HeapFree(GetProcessHeap(), 0, This->contents); HeapFree(GetProcessHeap(), 0, This); } @@ -519,7 +519,7 @@ static void test_storage_stream(void) ok(r==STG_E_INVALIDNAME, "IStorage->CreateStream wrong error\n"); r = IStorage_CreateStream(stg, longname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); ok(r==STG_E_INVALIDNAME || broken(r==S_OK) /* nt4 */, - "IStorage->CreateStream wrong error, got %d GetLastError()=%d\n", r, GetLastError()); + "IStorage->CreateStream wrong error, got %ld GetLastError()=%ld\n", r, GetLastError()); r = IStorage_CreateStream(stg, stmname, STGM_READWRITE, 0, 0, &stm ); ok(r==STG_E_INVALIDFLAG, "IStorage->CreateStream wrong error\n"); r = IStorage_CreateStream(stg, stmname, STGM_READ, 0, 0, &stm ); @@ -537,9 +537,9 @@ static void test_storage_stream(void)
/* test for support interfaces */ r = IStream_QueryInterface(stm, &IID_IPersist, (void**)&unk); - ok(r==E_NOINTERFACE, "got 0x%08x\n", r); + ok(r==E_NOINTERFACE, "got 0x%08lx\n", r); r = IStream_QueryInterface(stm, &IID_IPersistStream, (void**)&unk); - ok(r==E_NOINTERFACE, "got 0x%08x\n", r); + ok(r==E_NOINTERFACE, "got 0x%08lx\n", r);
r = IStream_Release(stm); ok(r == 0, "wrong ref count\n"); @@ -658,7 +658,7 @@ static void test_storage_stream(void) ok(r==S_OK, "IStorage->CreateStream failed\n");
r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p); - ok(r==STG_E_REVERTED, "overwritten stream should return STG_E_REVERTED instead of 0x%08x\n", r); + ok(r==STG_E_REVERTED, "overwritten stream should return STG_E_REVERTED instead of 0x%08lx\n", r);
r = IStream_Release(stm2); ok(r == 0, "wrong ref count\n"); @@ -676,7 +676,7 @@ static void test_storage_stream(void) if (stg) { r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); - ok(r == STG_E_INVALIDFLAG, "IStorage->OpenStream should return STG_E_INVALIDFLAG instead of 0x%08x\n", r); + ok(r == STG_E_INVALIDFLAG, "IStorage->OpenStream should return STG_E_INVALIDFLAG instead of 0x%08lx\n", r); IStorage_Release(stg); }
@@ -747,7 +747,7 @@ static void test_open_storage(void) /* try opening a nonexistent file - it should not create it */ stgm = STGM_DIRECT | STGM_SHARE_EXCLUSIVE | STGM_READWRITE; r = StgOpenStorage( filename, NULL, stgm, NULL, 0, &stg); - ok(r!=S_OK, "StgOpenStorage failed: 0x%08x\n", r); + ok(r!=S_OK, "StgOpenStorage failed: 0x%08lx\n", r); if (r==S_OK) IStorage_Release(stg); ok(!is_existing_file(filenameA), "StgOpenStorage should not create a file\n"); DeleteFileA(filenameA); @@ -1040,10 +1040,10 @@ static void test_storage_refcount(void) ok (r == STG_E_REVERTED, "stat should fail\n");
r = IStream_Write( stm, "Test string", strlen("Test string"), NULL); - ok (r == STG_E_REVERTED, "IStream_Write should return STG_E_REVERTED instead of 0x%08x\n", r); + ok (r == STG_E_REVERTED, "IStream_Write should return STG_E_REVERTED instead of 0x%08lx\n", r);
r = IStream_Read( stm, buffer, sizeof(buffer), NULL); - ok (r == STG_E_REVERTED, "IStream_Read should return STG_E_REVERTED instead of 0x%08x\n", r); + ok (r == STG_E_REVERTED, "IStream_Read should return STG_E_REVERTED instead of 0x%08lx\n", r);
r = IStream_Release(stm); ok (r == 0, "stream not released\n"); @@ -1051,19 +1051,19 @@ static void test_storage_refcount(void) /* tests that STGM_PRIORITY doesn't prevent readwrite access from other * StgOpenStorage calls in transacted mode */ r = StgOpenStorage( filename, NULL, STGM_PRIORITY, NULL, 0, &stgprio); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r);
/* non-transacted mode read/write fails */ r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); - ok(r==STG_E_LOCKVIOLATION, "StgOpenStorage should return STG_E_LOCKVIOLATION instead of 0x%08x\n", r); + ok(r==STG_E_LOCKVIOLATION, "StgOpenStorage should return STG_E_LOCKVIOLATION instead of 0x%08lx\n", r);
/* non-transacted mode read-only succeeds */ r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_WRITE|STGM_READ, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r); IStorage_Release(stg);
r = StgOpenStorage( filename, NULL, STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r); if(stg) { static const WCHAR stgname[] = { ' ',' ',' ','2','9',0 }; @@ -1074,40 +1074,40 @@ static void test_storage_refcount(void) STATSTG statstg;
r = IStorage_Stat( stg, &statstg, STATFLAG_NONAME ); - ok(r == S_OK, "Stat should have succeeded instead of returning 0x%08x\n", r); - ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %d\n", statstg.type); - ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %d\n", U(statstg.cbSize).LowPart); - ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %d\n", U(statstg.cbSize).HighPart); + ok(r == S_OK, "Stat should have succeeded instead of returning 0x%08lx\n", r); + ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %ld\n", statstg.type); + ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %ld\n", U(statstg.cbSize).LowPart); + ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %ld\n", U(statstg.cbSize).HighPart); ok(statstg.grfMode == (STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE), - "Statstg grfMode should have been 0x10022 instead of 0x%x\n", statstg.grfMode); - ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %d\n", statstg.grfLocksSupported); + "Statstg grfMode should have been 0x10022 instead of 0x%lx\n", statstg.grfMode); + ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %ld\n", statstg.grfLocksSupported); ok(IsEqualCLSID(&statstg.clsid, &test_stg_cls), "Statstg clsid is not test_stg_cls\n"); - ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %d\n", statstg.grfStateBits); - ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %d\n", statstg.reserved); + ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %ld\n", statstg.grfStateBits); + ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %ld\n", statstg.reserved);
r = IStorage_CreateStorage( stg, stgname, STGM_SHARE_EXCLUSIVE, 0, 0, &stg2 ); - ok(r == S_OK, "CreateStorage should have succeeded instead of returning 0x%08x\n", r); + ok(r == S_OK, "CreateStorage should have succeeded instead of returning 0x%08lx\n", r);
r = IStorage_Stat( stg2, &statstg, STATFLAG_DEFAULT ); - ok(r == S_OK, "Stat should have succeeded instead of returning 0x%08x\n", r); + ok(r == S_OK, "Stat should have succeeded instead of returning 0x%08lx\n", r); ok(!memcmp(statstg.pwcsName, stgname, sizeof(stgname)), "Statstg pwcsName should have been the name the storage was created with\n"); - ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %d\n", statstg.type); - ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %d\n", U(statstg.cbSize).LowPart); - ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %d\n", U(statstg.cbSize).HighPart); + ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %ld\n", statstg.type); + ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %ld\n", U(statstg.cbSize).LowPart); + ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %ld\n", U(statstg.cbSize).HighPart); ok(statstg.grfMode == STGM_SHARE_EXCLUSIVE, - "Statstg grfMode should have been STGM_SHARE_EXCLUSIVE instead of 0x%x\n", statstg.grfMode); - ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %d\n", statstg.grfLocksSupported); + "Statstg grfMode should have been STGM_SHARE_EXCLUSIVE instead of 0x%lx\n", statstg.grfMode); + ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %ld\n", statstg.grfLocksSupported); ok(IsEqualCLSID(&statstg.clsid, &CLSID_NULL), "Statstg clsid is not CLSID_NULL\n"); - ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %d\n", statstg.grfStateBits); - ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %d\n", statstg.reserved); + ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %ld\n", statstg.grfStateBits); + ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %ld\n", statstg.reserved); CoTaskMemFree(statstg.pwcsName);
r = IStorage_CreateStorage( stg2, stgname2, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, 0, &stg3 ); - ok(r == STG_E_ACCESSDENIED, "CreateStorage should have returned STG_E_ACCESSDENIED instead of 0x%08x\n", r); + ok(r == STG_E_ACCESSDENIED, "CreateStorage should have returned STG_E_ACCESSDENIED instead of 0x%08lx\n", r);
r = IStorage_CreateStream( stg2, stmname2, STGM_CREATE|STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); - ok(r == STG_E_ACCESSDENIED, "CreateStream should have returned STG_E_ACCESSDENIED instead of 0x%08x\n", r); + ok(r == STG_E_ACCESSDENIED, "CreateStream should have returned STG_E_ACCESSDENIED instead of 0x%08lx\n", r);
IStorage_Release(stg2);
@@ -1117,7 +1117,7 @@ static void test_storage_refcount(void)
/* Multiple STGM_PRIORITY opens are possible. */ r = StgOpenStorage( filename, NULL, STGM_PRIORITY, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r); if(stg) { r = IStorage_Release(stg); @@ -1125,7 +1125,7 @@ static void test_storage_refcount(void) }
r = StgOpenStorage( NULL, stgprio, STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r); if(stg) { static const WCHAR stgname[] = { ' ',' ',' ','2','9',0 }; @@ -1133,24 +1133,24 @@ static void test_storage_refcount(void) STATSTG statstg;
r = IStorage_Stat( stg, &statstg, STATFLAG_NONAME ); - ok(r == S_OK, "Stat should have succeeded instead of returning 0x%08x\n", r); - ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %d\n", statstg.type); - ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %d\n", U(statstg.cbSize).LowPart); - ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %d\n", U(statstg.cbSize).HighPart); + ok(r == S_OK, "Stat should have succeeded instead of returning 0x%08lx\n", r); + ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %ld\n", statstg.type); + ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %ld\n", U(statstg.cbSize).LowPart); + ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %ld\n", U(statstg.cbSize).HighPart); ok(statstg.grfMode == (STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE), - "Statstg grfMode should have been 0x10022 instead of 0x%x\n", statstg.grfMode); - ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %d\n", statstg.grfLocksSupported); + "Statstg grfMode should have been 0x10022 instead of 0x%lx\n", statstg.grfMode); + ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %ld\n", statstg.grfLocksSupported); ok(IsEqualCLSID(&statstg.clsid, &test_stg_cls), "Statstg clsid is not test_stg_cls\n"); - ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %d\n", statstg.grfStateBits); - ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %d\n", statstg.reserved); + ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %ld\n", statstg.grfStateBits); + ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %ld\n", statstg.reserved);
r = IStorage_CreateStorage( stg, stgname, STGM_SHARE_EXCLUSIVE, 0, 0, &stg2 ); - ok(r == S_OK, "CreateStorage should have succeeded instead of returning 0x%08x\n", r); + ok(r == S_OK, "CreateStorage should have succeeded instead of returning 0x%08lx\n", r);
IStorage_Release(stg2);
r = IStorage_Commit( stg, 0 ); - ok(r == S_OK, "Commit should have succeeded instead of returning 0x%08x\n", r); + ok(r == S_OK, "Commit should have succeeded instead of returning 0x%08lx\n", r);
r = IStorage_Release(stg); ok(r == 0, "wrong ref count\n"); @@ -1174,34 +1174,34 @@ static void test_writeclassstg(void) ok(r==S_OK, "StgCreateDocfile failed\n");
r = ReadClassStg( NULL, NULL ); - ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08X\n", r); + ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08lX\n", r);
memset(&temp_cls, 0xcc, sizeof(temp_cls)); memset(&cls2, 0xcc, sizeof(cls2)); r = ReadClassStg( NULL, &temp_cls ); - ok(r == E_INVALIDARG, "got 0x%08x\n", r); + ok(r == E_INVALIDARG, "got 0x%08lx\n", r); ok(IsEqualCLSID(&temp_cls, &cls2), "got wrong clsid\n");
r = ReadClassStg( stg, NULL ); - ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08X\n", r); + ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08lX\n", r);
temp_cls.Data1 = 0xdeadbeef; r = ReadClassStg( stg, &temp_cls ); - ok(r == S_OK, "ReadClassStg failed with 0x%08X\n", r); + ok(r == S_OK, "ReadClassStg failed with 0x%08lX\n", r);
ok(IsEqualCLSID(&temp_cls, &CLSID_NULL), "ReadClassStg returned wrong clsid\n");
r = WriteClassStg( NULL, NULL ); - ok(r == E_INVALIDARG, "WriteClassStg should return E_INVALIDARG instead of 0x%08X\n", r); + ok(r == E_INVALIDARG, "WriteClassStg should return E_INVALIDARG instead of 0x%08lX\n", r);
r = WriteClassStg( stg, NULL ); - ok(r == STG_E_INVALIDPOINTER, "WriteClassStg should return STG_E_INVALIDPOINTER instead of 0x%08X\n", r); + ok(r == STG_E_INVALIDPOINTER, "WriteClassStg should return STG_E_INVALIDPOINTER instead of 0x%08lX\n", r);
r = WriteClassStg( stg, &test_stg_cls ); - ok( r == S_OK, "WriteClassStg failed with 0x%08X\n", r); + ok( r == S_OK, "WriteClassStg failed with 0x%08lX\n", r);
r = ReadClassStg( stg, &temp_cls ); - ok( r == S_OK, "ReadClassStg failed with 0x%08X\n", r); + ok( r == S_OK, "ReadClassStg failed with 0x%08lX\n", r); ok(IsEqualCLSID(&temp_cls, &test_stg_cls), "ReadClassStg returned wrong clsid\n");
r = IStorage_Release( stg ); @@ -1255,7 +1255,7 @@ static void test_streamenum(void) CoTaskMemFree(stat.pwcsName);
r = IEnumSTATSTG_Release(ee); - ok(r==S_OK, "EnumSTATSTG_Release failed with error 0x%08x\n", r); + ok(r==S_OK, "EnumSTATSTG_Release failed with error 0x%08lx\n", r);
/* second enum... destroy the stream before reading */ r = IStorage_EnumElements(stg, 0, NULL, 0, &ee); @@ -1288,7 +1288,7 @@ static void test_streamenum(void) ok(r==S_OK, "IStorage->CreateStream failed\n");
r = IStream_Release(stm); - ok(r==S_OK, "Stream_Release failed with error 0x%08x\n", r); + ok(r==S_OK, "Stream_Release failed with error 0x%08lx\n", r);
count = 0xf00; r = IEnumSTATSTG_Next(ee, 1, &stat, &count); @@ -1305,7 +1305,7 @@ static void test_streamenum(void) ok(r==S_OK, "IStorage->CreateStream failed\n");
r = IStream_Release(stm); - ok(r==S_OK, "Stream_Release failed with error 0x%08x\n", r); + ok(r==S_OK, "Stream_Release failed with error 0x%08lx\n", r);
count = 0xf00; r = IEnumSTATSTG_Next(ee, 1, &stat, &count); @@ -1323,7 +1323,7 @@ static void test_streamenum(void) ok(r==S_OK, "IStorage->CreateStream failed\n");
r = IStream_Release(stm); - ok(r==S_OK, "Stream_Release failed with error 0x%08x\n", r); + ok(r==S_OK, "Stream_Release failed with error 0x%08lx\n", r);
r = IEnumSTATSTG_Reset(ee); ok(r==S_OK, "IEnumSTATSTG->Reset failed\n"); @@ -1379,7 +1379,7 @@ static void test_streamenum(void) STGM_READWRITE |STGM_TRANSACTED, NULL, 0, &stg); ok(r==STG_E_SHAREVIOLATION || r==STG_E_LOCKVIOLATION, /* XP-SP2/W2K3-SP1 and below */ - "StgCreateDocfile failed, res=%x\n", r); + "StgCreateDocfile failed, res=%lx\n", r);
r = IEnumSTATSTG_Release(ee); ok (r == 0, "enum not released\n"); @@ -1415,13 +1415,13 @@ static void test_transact(void) IStream_Release(stm);
r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) { /* Create two substorages but only commit one */ r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) IStorage_Release(stg3); @@ -1430,7 +1430,7 @@ static void test_transact(void) ok(r==S_OK, "IStorage->Commit failed\n");
r = IStorage_CreateStorage(stg2, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) IStorage_Release(stg3); @@ -1451,7 +1451,7 @@ static void test_transact(void) ok(r==S_OK, "IStream->Commit failed\n");
r = IStorage_CreateStorage(stg, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) IStorage_Release(stg2); @@ -1469,46 +1469,46 @@ static void test_transact(void) return;
r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_DENY_NONE|STGM_READ, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_INVALIDFLAG, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_DELETEONRELEASE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStorage(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08lx\n", r); if (r == S_OK) IStream_Release(stm);
r = IStorage_OpenStorage(stg, stgname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08lx\n", r); if (r == S_OK) IStorage_Release(stg2);
r = IStorage_OpenStorage(stg, stmname2, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==S_OK, "IStorage->OpenStream should succeed %08x\n", r); + ok(r==S_OK, "IStorage->OpenStream should succeed %08lx\n", r); if (r == S_OK) IStream_Release(stm);
r = IStorage_OpenStorage(stg, stgname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==S_OK, "IStorage->OpenStorage should succeed %08x\n", r); + ok(r==S_OK, "IStorage->OpenStorage should succeed %08lx\n", r); if (r == S_OK) { r = IStorage_OpenStorage(stg2, stgname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg3 ); - ok(r==S_OK, "IStorage->OpenStorage should succeed %08x\n", r); + ok(r==S_OK, "IStorage->OpenStorage should succeed %08lx\n", r); if (r == S_OK) IStorage_Release(stg3);
r = IStorage_OpenStorage(stg2, stgname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg3 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08lx\n", r); if (r == S_OK) IStorage_Release(stg3);
@@ -1540,33 +1540,33 @@ static void test_substorage_share(void)
/* create a read/write storage and try to open it again */ r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) { r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage should fail %08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage should fail %08lx\n", r);
if (r == S_OK) IStorage_Release(stg3);
r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage should fail %08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage should fail %08lx\n", r);
if (r == S_OK) IStorage_Release(stg3);
/* cannot rename the storage while it's open */ r = IStorage_RenameElement(stg, stgname, othername); - ok(r==STG_E_ACCESSDENIED, "IStorage->RenameElement should fail %08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->RenameElement should fail %08lx\n", r); if (SUCCEEDED(r)) IStorage_RenameElement(stg, othername, stgname);
/* destroying an object while it's open invalidates it */ r = IStorage_DestroyElement(stg, stgname); - ok(r==S_OK, "IStorage->DestroyElement failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->DestroyElement failed, hr=%08lx\n", r);
r = IStorage_CreateStream(stg2, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(r==STG_E_REVERTED, "IStorage->CreateStream failed, hr=%08x\n", r); + ok(r==STG_E_REVERTED, "IStorage->CreateStream failed, hr=%08lx\n", r);
if (r == S_OK) IStream_Release(stm); @@ -1576,33 +1576,33 @@ static void test_substorage_share(void)
/* create a read/write stream and try to open it again */ r = IStorage_CreateStream(stg, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStream failed, hr=%08lx\n", r);
if (r == S_OK) { r = IStorage_OpenStream(stg, stmname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm2); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStream should fail %08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStream should fail %08lx\n", r);
if (r == S_OK) IStream_Release(stm2);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm2); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStream should fail %08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStream should fail %08lx\n", r);
if (r == S_OK) IStream_Release(stm2);
/* cannot rename the stream while it's open */ r = IStorage_RenameElement(stg, stmname, othername); - ok(r==STG_E_ACCESSDENIED, "IStorage->RenameElement should fail %08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->RenameElement should fail %08lx\n", r); if (SUCCEEDED(r)) IStorage_RenameElement(stg, othername, stmname);
/* destroying an object while it's open invalidates it */ r = IStorage_DestroyElement(stg, stmname); - ok(r==S_OK, "IStorage->DestroyElement failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->DestroyElement failed, hr=%08lx\n", r);
r = IStream_Write(stm, "this shouldn't work\n", 20, NULL); - ok(r==STG_E_REVERTED, "IStream_Write should fail %08x\n", r); + ok(r==STG_E_REVERTED, "IStream_Write should fail %08lx\n", r);
IStream_Release(stm); } @@ -1640,13 +1640,13 @@ static void test_revert(void) ok(r==S_OK, "IStream->Write failed\n");
r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) { /* Create two substorages but only commit one */ r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) IStorage_Release(stg3); @@ -1655,7 +1655,7 @@ static void test_revert(void) ok(r==S_OK, "IStorage->Commit failed\n");
r = IStorage_CreateStorage(stg2, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) IStorage_Release(stg3); @@ -1669,23 +1669,23 @@ static void test_revert(void) ok(r==S_OK, "IStream->Write failed\n");
r = IStorage_CreateStorage(stg, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
r = IStorage_Revert(stg); - ok(r==S_OK, "Storage_Revert failed with error 0x%08x\n", r); + ok(r==S_OK, "Storage_Revert failed with error 0x%08lx\n", r);
/* all open objects become invalid */ r = IStream_Write(stm, "this shouldn't work\n", 20, NULL); - ok(r==STG_E_REVERTED, "IStream_Write should fail %08x\n", r); + ok(r==STG_E_REVERTED, "IStream_Write should fail %08lx\n", r);
r = IStream_Write(stm2, "this shouldn't work\n", 20, NULL); - ok(r==STG_E_REVERTED, "IStream_Write should fail %08x\n", r); + ok(r==STG_E_REVERTED, "IStream_Write should fail %08lx\n", r);
r = IStorage_Stat(stg2, &statstg, STATFLAG_NONAME); - ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08x\n", r); + ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08lx\n", r);
r = IStorage_Stat(stg3, &statstg, STATFLAG_NONAME); - ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08x\n", r); + ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08lx\n", r);
IStream_Release(stm); IStream_Release(stm2); @@ -1693,46 +1693,46 @@ static void test_revert(void) IStorage_Release(stg3);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_DENY_NONE|STGM_READ, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_INVALIDFLAG, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_DELETEONRELEASE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStorage(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08lx\n", r); if (r == S_OK) IStream_Release(stm);
r = IStorage_OpenStorage(stg, stgname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08lx\n", r); if (r == S_OK) IStorage_Release(stg2);
r = IStorage_OpenStorage(stg, stmname2, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08lx\n", r);
r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==S_OK, "IStorage->OpenStream should succeed %08x\n", r); + ok(r==S_OK, "IStorage->OpenStream should succeed %08lx\n", r); if (r == S_OK) IStream_Release(stm);
r = IStorage_OpenStorage(stg, stgname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==S_OK, "IStorage->OpenStorage should succeed %08x\n", r); + ok(r==S_OK, "IStorage->OpenStorage should succeed %08lx\n", r); if (r == S_OK) { r = IStorage_OpenStorage(stg2, stgname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg3 ); - ok(r==S_OK, "IStorage->OpenStorage should succeed %08x\n", r); + ok(r==S_OK, "IStorage->OpenStorage should succeed %08lx\n", r); if (r == S_OK) IStorage_Release(stg3);
r = IStorage_OpenStorage(stg2, stgname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg3 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08lx\n", r); if (r == S_OK) IStorage_Release(stg3);
@@ -1753,10 +1753,10 @@ static void test_revert(void) ok(r==S_OK, "IStorage->CreateStream failed\n");
r = IStorage_Revert(stg); - ok(r==S_OK, "IStorage->Revert failed %08x\n", r); + ok(r==S_OK, "IStorage->Revert failed %08lx\n", r);
r = IStream_Write(stm, "this works\n", 11, NULL); - ok(r==S_OK, "IStream_Write should succeed %08x\n", r); + ok(r==S_OK, "IStream_Write should succeed %08lx\n", r);
IStream_Release(stm); IStorage_Release(stg); @@ -1785,7 +1785,7 @@ static void test_parent_free(void)
/* create a new storage */ r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) { @@ -1802,21 +1802,21 @@ static void test_parent_free(void)
/* free the parent */ ref = IStorage_Release(stg2); - ok(ref == 0, "IStorage still has %u references\n", ref); + ok(ref == 0, "IStorage still has %lu references\n", ref);
/* child objects are invalid */ if (r == S_OK) { r = IStream_Write(stm, "this should fail\n", 17, NULL); - ok(r==STG_E_REVERTED, "IStream->Write should fail, hr=%x\n", r); + ok(r==STG_E_REVERTED, "IStream->Write should fail, hr=%lx\n", r);
IStream_Release(stm);
r = IStorage_Stat(stg3, &statstg, STATFLAG_NONAME); - ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08x\n", r); + ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08lx\n", r);
r = IStorage_SetStateBits(stg3, 1, 1); - ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08x\n", r); + ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08lx\n", r);
IStorage_Release(stg3); } @@ -1847,7 +1847,7 @@ static void test_nonroot_transacted(void)
/* create a transacted substorage */ r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) { @@ -1869,12 +1869,12 @@ static void test_nonroot_transacted(void)
/* check that Commit and Revert really worked */ r = IStorage_OpenStream(stg2, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==S_OK, "IStorage->OpenStream should succeed %08x\n", r); + ok(r==S_OK, "IStorage->OpenStream should succeed %08lx\n", r); if (r == S_OK) IStream_Release(stm);
r = IStorage_OpenStream(stg2, stmname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08lx\n", r); if (r == S_OK) IStream_Release(stm);
@@ -1883,19 +1883,19 @@ static void test_nonroot_transacted(void)
/* create a read-only transacted substorage */ r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, NULL, 0, &stg2); - ok(r==S_OK, "IStorage->OpenStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->OpenStorage failed, hr=%08lx\n", r);
if (r == S_OK) { /* The storage can be modified. */ r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r); if (r == S_OK) IStorage_Release(stg3);
/* But changes cannot be committed. */ r = IStorage_Commit(stg2, 0); - ok(r==STG_E_ACCESSDENIED, "IStorage->Commit should fail, hr=%08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->Commit should fail, hr=%08lx\n", r);
IStorage_Release(stg2); } @@ -1909,7 +1909,7 @@ static void test_nonroot_transacted(void)
/* create a transacted substorage */ r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
if (r == S_OK) { @@ -1931,12 +1931,12 @@ static void test_nonroot_transacted(void)
/* check that Commit and Revert really worked */ r = IStorage_OpenStream(stg2, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==S_OK, "IStorage->OpenStream should succeed %08x\n", r); + ok(r==S_OK, "IStorage->OpenStream should succeed %08lx\n", r); if (r == S_OK) IStream_Release(stm);
r = IStorage_OpenStream(stg2, stmname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08lx\n", r); if (r == S_OK) IStream_Release(stm);
@@ -1957,7 +1957,7 @@ static void test_ReadClassStm(void) static const LARGE_INTEGER llZero;
hr = ReadClassStm(NULL, &clsid); - ok(hr == E_INVALIDARG, "ReadClassStm should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ReadClassStm should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); ok_ole_success(hr, "CreateStreamOnHGlobal"); @@ -1965,17 +1965,17 @@ static void test_ReadClassStm(void) ok_ole_success(hr, "WriteClassStm");
hr = ReadClassStm(pStream, NULL); - ok(hr == E_INVALIDARG, "ReadClassStm should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ReadClassStm should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
memset(&clsid, 0xcc, sizeof(clsid)); memset(&clsid2, 0xcc, sizeof(clsid2)); hr = ReadClassStm(NULL, &clsid); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &clsid2), "got wrong clsid\n");
/* test not rewound stream */ hr = ReadClassStm(pStream, &clsid); - ok(hr == STG_E_READFAULT, "ReadClassStm should have returned STG_E_READFAULT instead of 0x%08x\n", hr); + ok(hr == STG_E_READFAULT, "ReadClassStm should have returned STG_E_READFAULT instead of 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_NULL), "clsid should have been zeroed\n");
hr = IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); @@ -2088,13 +2088,13 @@ static void _test_file_access(LPCSTR file, const struct access_res *ares, DWORD lasterr = GetLastError();
ok((hfile != INVALID_HANDLE_VALUE) == ares[idx].gothandle, - "(%d, handle, %d): Expected %d, got %d\n", + "(%ld, handle, %d): Expected %d, got %d\n", line, idx, ares[idx].gothandle, (hfile != INVALID_HANDLE_VALUE));
ok(lasterr == ares[idx].lasterr || broken(lasterr == 0xdeadbeef) /* win9x */, - "(%d, lasterr, %d): Expected %d, got %d\n", + "(%ld, lasterr, %d): Expected %ld, got %ld\n", line, idx, ares[idx].lasterr, lasterr);
CloseHandle(hfile); @@ -2115,12 +2115,12 @@ static void test_access(void) /* STGM_TRANSACTED */ hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create);
hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create_commit);
@@ -2133,12 +2133,12 @@ static void test_access(void) /* STGM_DIRECT */ hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DIRECT, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create);
hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create_commit);
@@ -2151,12 +2151,12 @@ static void test_access(void) /* STGM_SHARE_DENY_NONE */ hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | STGM_SHARE_DENY_NONE | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create);
hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create_commit);
@@ -2169,12 +2169,12 @@ static void test_access(void) /* STGM_SHARE_DENY_READ */ hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | STGM_SHARE_DENY_READ | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create);
hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create_commit);
@@ -2187,12 +2187,12 @@ static void test_access(void) /* STGM_SHARE_DENY_WRITE */ hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | STGM_SHARE_DENY_WRITE | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create);
hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
test_file_access(fileA, create_commit);
@@ -2204,11 +2204,11 @@ static void test_access(void)
/* STGM_DIRECT_SWMR | STGM_READ | STGM_SHARE_DENY_NONE - reader mode for direct SWMR mode */ hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | STGM_SHARE_DENY_WRITE | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); IStorage_Release(stg);
hr = StgOpenStorage(fileW, NULL, STGM_DIRECT_SWMR | STGM_READ | STGM_SHARE_DENY_NONE, NULL, 0, &stg); - ok(hr == S_OK || broken(hr == STG_E_INVALIDFLAG), "got %08x\n", hr); + ok(hr == S_OK || broken(hr == STG_E_INVALIDFLAG), "got %08lx\n", hr); if(hr != S_OK) return;
@@ -2230,15 +2230,15 @@ static void test_readonly(void) static const WCHAR streamW[] = {'s','t','r','e','a','m',0};
hr = StgCreateDocfile( fileW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr); if (SUCCEEDED(hr)) { hr = IStorage_CreateStorage( stg, storageW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stg2 ); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr); if (SUCCEEDED(hr)) { hr = IStorage_CreateStream( stg2, streamW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stream ); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr); if (SUCCEEDED(hr)) IStream_Release(stream); IStorage_Release(stg2); @@ -2248,44 +2248,44 @@ static void test_readonly(void)
/* re-open read only */ hr = StgOpenStorage( fileW, NULL, STGM_TRANSACTED | STGM_SHARE_DENY_NONE | STGM_READ, NULL, 0, &stg); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr); if (SUCCEEDED(hr)) { hr = IStorage_OpenStorage( stg, storageW, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 0, &stg2 ); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr); if (SUCCEEDED(hr)) { /* CreateStream on read-only storage, name exists */ hr = IStorage_CreateStream( stg2, streamW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stream ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); + ok(hr == STG_E_ACCESSDENIED, "should fail, res=%lx\n", hr); if (SUCCEEDED(hr)) IStream_Release(stream);
/* CreateStream on read-only storage, name does not exist */ hr = IStorage_CreateStream( stg2, storageW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stream ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); + ok(hr == STG_E_ACCESSDENIED, "should fail, res=%lx\n", hr); if (SUCCEEDED(hr)) IStream_Release(stream);
/* CreateStorage on read-only storage, name exists */ hr = IStorage_CreateStorage( stg2, streamW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stg3 ); - ok(hr == STG_E_FILEALREADYEXISTS, "should fail, res=%x\n", hr); + ok(hr == STG_E_FILEALREADYEXISTS, "should fail, res=%lx\n", hr); if (SUCCEEDED(hr)) IStorage_Release(stg3);
/* CreateStorage on read-only storage, name does not exist */ hr = IStorage_CreateStorage( stg2, storageW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stg3 ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); + ok(hr == STG_E_ACCESSDENIED, "should fail, res=%lx\n", hr); if (SUCCEEDED(hr)) IStorage_Release(stg3);
/* DestroyElement on read-only storage, name exists */ hr = IStorage_DestroyElement( stg2, streamW ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); + ok(hr == STG_E_ACCESSDENIED, "should fail, res=%lx\n", hr);
/* DestroyElement on read-only storage, name does not exist */ hr = IStorage_DestroyElement( stg2, storageW ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); + ok(hr == STG_E_ACCESSDENIED, "should fail, res=%lx\n", hr);
IStorage_Release(stg2); } @@ -2314,61 +2314,61 @@ static void test_simple(void) DeleteFileA(filenameA);
r = StgCreateDocfile( filename, STGM_SIMPLE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(r == S_OK, "got %08x\n", r); + ok(r == S_OK, "got %08lx\n", r);
r = IStorage_CreateStorage(stg, stgname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stg2); - ok(r == STG_E_INVALIDFUNCTION, "got %08x\n", r); + ok(r == STG_E_INVALIDFUNCTION, "got %08lx\n", r); if (SUCCEEDED(r)) IStorage_Release(stg2);
r = IStorage_CreateStream(stg, stmname, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); - ok(r == STG_E_INVALIDFLAG, "got %08x\n", r); + ok(r == STG_E_INVALIDFLAG, "got %08lx\n", r); r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); - ok(r == S_OK, "got %08x\n", r); + ok(r == S_OK, "got %08lx\n", r);
upos.QuadPart = 6000; r = IStream_SetSize(stm, upos); - ok(r == S_OK, "got %08x\n", r); + ok(r == S_OK, "got %08lx\n", r);
r = IStream_Write(stm, "foo", 3, &count); - ok(r == S_OK, "got %08x\n", r); - ok(count == 3, "got %d\n", count); + ok(r == S_OK, "got %08lx\n", r); + ok(count == 3, "got %ld\n", count);
pos.QuadPart = 0; r = IStream_Seek(stm, pos, STREAM_SEEK_CUR, &upos); - ok(r == S_OK, "got %08x\n", r); - ok(upos.QuadPart == 3, "got %d\n", upos.u.LowPart); + ok(r == S_OK, "got %08lx\n", r); + ok(upos.QuadPart == 3, "got %ld\n", upos.u.LowPart);
r = IStream_Stat(stm, &stat, STATFLAG_NONAME); ok(r == S_OK || broken(r == STG_E_INVALIDFUNCTION), /* NT4 and below */ - "got %08x\n", r); + "got %08lx\n", r); if (r == S_OK) - ok(stat.cbSize.QuadPart == 3, "got %d\n", stat.cbSize.u.LowPart); + ok(stat.cbSize.QuadPart == 3, "got %ld\n", stat.cbSize.u.LowPart);
pos.QuadPart = 1; r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); - ok(r == S_OK, "got %08x\n", r); - ok(upos.QuadPart == 1, "got %d\n", upos.u.LowPart); + ok(r == S_OK, "got %08lx\n", r); + ok(upos.QuadPart == 1, "got %ld\n", upos.u.LowPart);
r = IStream_Stat(stm, &stat, STATFLAG_NONAME); ok(r == S_OK || broken(r == STG_E_INVALIDFUNCTION), /* NT4 and below */ - "got %08x\n", r); + "got %08lx\n", r); if (r == S_OK) - ok(stat.cbSize.QuadPart == 1, "got %d\n", stat.cbSize.u.LowPart); + ok(stat.cbSize.QuadPart == 1, "got %ld\n", stat.cbSize.u.LowPart);
IStream_Release(stm);
r = IStorage_CreateStream(stg, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); - ok(r == S_OK, "got %08x\n", r); + ok(r == S_OK, "got %08lx\n", r);
upos.QuadPart = 100; r = IStream_SetSize(stm, upos); - ok(r == S_OK, "got %08x\n", r); + ok(r == S_OK, "got %08lx\n", r);
r = IStream_Write(stm, "foo", 3, &count); - ok(r == S_OK, "got %08x\n", r); - ok(count == 3, "got %d\n", count); + ok(r == S_OK, "got %08lx\n", r); + ok(count == 3, "got %ld\n", count);
IStream_Release(stm);
@@ -2382,27 +2382,27 @@ static void test_simple(void) DeleteFileA(filenameA); return; } - ok(r == S_OK, "got %08x\n", r); + ok(r == S_OK, "got %08lx\n", r);
r = IStorage_OpenStorage(stg, stgname, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, NULL, 0, &stg2); - ok(r == STG_E_INVALIDFUNCTION, "got %08x\n", r); + ok(r == STG_E_INVALIDFUNCTION, "got %08lx\n", r); if (SUCCEEDED(r)) IStorage_Release(stg2);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); - ok(r == S_OK, "got %08x\n", r); + ok(r == S_OK, "got %08lx\n", r);
r = IStream_Stat(stm, &stat, STATFLAG_NONAME); - ok(r == S_OK, "got %08x\n", r); - ok(stat.cbSize.QuadPart == 6000, "got %d\n", stat.cbSize.u.LowPart); + ok(r == S_OK, "got %08lx\n", r); + ok(stat.cbSize.QuadPart == 6000, "got %ld\n", stat.cbSize.u.LowPart);
IStream_Release(stm);
r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); - ok(r == S_OK, "got %08x\n", r); + ok(r == S_OK, "got %08lx\n", r);
r = IStream_Stat(stm, &stat, STATFLAG_NONAME); - ok(r == S_OK, "got %08x\n", r); - ok(stat.cbSize.QuadPart == 4096, "got %d\n", stat.cbSize.u.LowPart); + ok(r == S_OK, "got %08lx\n", r); + ok(stat.cbSize.QuadPart == 4096, "got %ld\n", stat.cbSize.u.LowPart);
IStream_Release(stm);
@@ -2424,17 +2424,17 @@ static void test_fmtusertypestg(void) static const STATSTG statstg_null;
hr = StgCreateDocfile( fileW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr);
if (SUCCEEDED(hr)) { /* try to write the stream */ hr = WriteFmtUserTypeStg(stg, 0, userTypeW); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr);
/* check that the stream was created */ hr = IStorage_EnumElements(stg, 0, NULL, 0, &stat); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr); if (SUCCEEDED(hr)) { BOOL found = FALSE; @@ -2456,11 +2456,11 @@ static void test_fmtusertypestg(void)
/* re-write the stream */ hr = WriteFmtUserTypeStg(stg, 0, userTypeW); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr);
/* check that the stream is still there */ hr = IStorage_EnumElements(stg, 0, NULL, 0, &stat); - ok(hr == S_OK, "should succeed, res=%x\n", hr); + ok(hr == S_OK, "should succeed, res=%lx\n", hr); if (SUCCEEDED(hr)) { BOOL found = FALSE; @@ -2502,12 +2502,12 @@ static void test_references(void) IStorage_Release(stg);
hr = StgOpenStorage( filename, NULL, STGM_TRANSACTED | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, NULL, 0, &stg); - ok(hr==S_OK, "StgOpenStorage failed (result=%x)\n",hr); + ok(hr==S_OK, "StgOpenStorage failed (result=%lx)\n",hr);
if (SUCCEEDED(hr)) { hr = IStorage_CreateStorage(stg,StorName,STGM_READWRITE | STGM_SHARE_EXCLUSIVE,0,0,&stg2); - ok(hr == S_OK, "IStorage_CreateStorage failed (result=%x)\n",hr); + ok(hr == S_OK, "IStorage_CreateStorage failed (result=%lx)\n",hr);
if (SUCCEEDED(hr)) { @@ -2544,38 +2544,38 @@ static HRESULT create_test_file(IStorage *dest) HRESULT hr;
hr = IStorage_CreateStorage(dest, stgA_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stgA); - ok(hr == S_OK, "IStorage_CreateStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_CreateStorage failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
hr = IStorage_CreateStream(stgA, strmA_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &strmA); - ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
hr = IStream_Write(strmA, strmA_name, strmA_name_size, &bytes); - ok(hr == S_OK && bytes == strmA_name_size, "IStream_Write failed: 0x%08x, %d of %d bytes written\n", hr, bytes, strmA_name_size); + ok(hr == S_OK && bytes == strmA_name_size, "IStream_Write failed: 0x%08lx, %ld of %ld bytes written\n", hr, bytes, strmA_name_size);
hr = IStorage_CreateStorage(dest, stgB_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stgB); - ok(hr == S_OK, "IStorage_CreateStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_CreateStorage failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
hr = IStorage_CreateStream(stgB, strmB_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &strmB); - ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
hr = IStream_Write(strmB, strmB_name, strmB_name_size, &bytes); - ok(hr == S_OK && bytes == strmB_name_size, "IStream_Write failed: 0x%08x, %d of %d bytes written\n", hr, bytes, strmB_name_size); + ok(hr == S_OK && bytes == strmB_name_size, "IStream_Write failed: 0x%08lx, %ld of %ld bytes written\n", hr, bytes, strmB_name_size);
hr = IStorage_CreateStream(dest, strmC_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &strmC); - ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
hr = IStream_Write(strmC, strmC_name, strmC_name_size, &bytes); - ok(hr == S_OK && bytes == strmC_name_size, "IStream_Write failed: 0x%08x, %d of %d bytes written\n", hr, bytes, strmC_name_size); + ok(hr == S_OK && bytes == strmC_name_size, "IStream_Write failed: 0x%08lx, %ld of %ld bytes written\n", hr, bytes, strmC_name_size);
cleanup: if(strmC) @@ -2601,7 +2601,7 @@ static void test_copyto(void)
/* create & populate file1 */ hr = StgCreateDocfile(file1_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file1); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
@@ -2611,33 +2611,33 @@ static void test_copyto(void)
/* create file2 */ hr = StgCreateDocfile(file2_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file2); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
/* copy file1 into file2 */ hr = IStorage_CopyTo(file1, 0, NULL, NULL, NULL); - ok(hr == STG_E_INVALIDPOINTER, "CopyTo should give STG_E_INVALIDPONITER, gave: 0x%08x\n", hr); + ok(hr == STG_E_INVALIDPOINTER, "CopyTo should give STG_E_INVALIDPONITER, gave: 0x%08lx\n", hr);
hr = IStorage_CopyTo(file1, 0, NULL, NULL, file2); - ok(hr == S_OK, "CopyTo failed: 0x%08x\n", hr); + ok(hr == S_OK, "CopyTo failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
/* verify that all of file1 was copied */ hr = IStorage_OpenStorage(file2, stgA_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStorage failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ hr = IStorage_OpenStream(stg_tmp, strmA_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStream failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ memset(buf, 0, sizeof(buf)); hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); + ok(hr == S_OK, "Read failed: 0x%08lx\n", hr); if(SUCCEEDED(hr)) ok(strcmp_ww(buf, strmA_name) == 0, "Expected %s to be read, got %s\n", wine_dbgstr_w(strmA_name), wine_dbgstr_w(buf)); @@ -2650,17 +2650,17 @@ static void test_copyto(void)
hr = IStorage_OpenStorage(file2, stgB_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStorage failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ hr = IStorage_OpenStream(stg_tmp, strmB_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStream failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ memset(buf, 0, sizeof(buf)); hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); + ok(hr == S_OK, "Read failed: 0x%08lx\n", hr); if(SUCCEEDED(hr)) ok(strcmp_ww(buf, strmB_name) == 0, "Expected %s to be read, got %s\n", wine_dbgstr_w(strmB_name), wine_dbgstr_w(buf)); @@ -2673,12 +2673,12 @@ static void test_copyto(void)
hr = IStorage_OpenStream(file2, strmC_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStream failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ memset(buf, 0, sizeof(buf)); hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); + ok(hr == S_OK, "Read failed: 0x%08lx\n", hr); if(SUCCEEDED(hr)) ok(strcmp_ww(buf, strmC_name) == 0, "Expected %s to be read, got %s\n", wine_dbgstr_w(strmC_name), wine_dbgstr_w(buf)); @@ -2707,7 +2707,7 @@ static void test_copyto_snbexclusions(void)
/* create & populate file1 */ hr = StgCreateDocfile(file1_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file1); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
@@ -2717,42 +2717,42 @@ static void test_copyto_snbexclusions(void)
/* create file2 */ hr = StgCreateDocfile(file2_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file2); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
/* copy file1 to file2 with name exclusions */ hr = IStorage_CopyTo(file1, 0, NULL, (SNB)snb_exclude, file2); - ok(hr == S_OK, "CopyTo failed: 0x%08x\n", hr); + ok(hr == S_OK, "CopyTo failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
/* verify that file1 copied over, respecting exclusions */ hr = IStorage_OpenStorage(file2, stgA_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStorage_Release(stg_tmp);
hr = IStorage_OpenStream(file2, strmA_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStream_Release(strm_tmp);
hr = IStorage_OpenStorage(file2, stgB_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStorage failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ hr = IStorage_OpenStream(stg_tmp, strmB_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStream failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ memset(buf, 0, sizeof(buf)); hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); + ok(hr == S_OK, "Read failed: 0x%08lx\n", hr); if(SUCCEEDED(hr)) ok(strcmp_ww(buf, strmB_name) == 0, "Expected %s to be read, got %s\n", wine_dbgstr_w(strmB_name), wine_dbgstr_w(buf)); @@ -2765,7 +2765,7 @@ static void test_copyto_snbexclusions(void)
hr = IStorage_OpenStream(file2, strmC_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStream_Release(strm_tmp);
@@ -2788,7 +2788,7 @@ static void test_copyto_iidexclusions_storage(void)
/* create & populate file1 */ hr = StgCreateDocfile(file1_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file1); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
@@ -2798,49 +2798,49 @@ static void test_copyto_iidexclusions_storage(void)
/* create file2 */ hr = StgCreateDocfile(file2_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file2); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
/* copy file1 to file2 with iid exclusions */ hr = IStorage_CopyTo(file1, 1, &IID_IStorage, NULL, file2); - ok(hr == S_OK, "CopyTo failed: 0x%08x\n", hr); + ok(hr == S_OK, "CopyTo failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
/* verify that file1 copied over, respecting exclusions */ hr = IStorage_OpenStorage(file2, stgA_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStorage_Release(stg_tmp);
hr = IStorage_OpenStream(file2, strmA_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStream_Release(strm_tmp);
hr = IStorage_OpenStorage(file2, stgB_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStorage_Release(stg_tmp);
hr = IStorage_OpenStream(file2, strmB_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStream_Release(strm_tmp);
hr = IStorage_OpenStream(file2, strmC_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStream failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ memset(buf, 0, sizeof(buf)); hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); + ok(hr == S_OK, "Read failed: 0x%08lx\n", hr); if(SUCCEEDED(hr)) ok(strcmp_ww(buf, strmC_name) == 0, "Expected %s to be read, got %s\n", wine_dbgstr_w(strmC_name), wine_dbgstr_w(buf)); @@ -2866,7 +2866,7 @@ static void test_copyto_iidexclusions_stream(void)
/* create & populate file1 */ hr = StgCreateDocfile(file1_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file1); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
@@ -2876,25 +2876,25 @@ static void test_copyto_iidexclusions_stream(void)
/* create file2 */ hr = StgCreateDocfile(file2_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file2); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); + ok(hr == S_OK, "StgCreateDocfile failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
/* copy file1 to file2 with iid exclusions */ hr = IStorage_CopyTo(file1, 1, &IID_IStream, NULL, file2); - ok(hr == S_OK, "CopyTo failed: 0x%08x\n", hr); + ok(hr == S_OK, "CopyTo failed: 0x%08lx\n", hr); if(FAILED(hr)) goto cleanup;
/* verify that file1 copied over, respecting exclusions */ hr = IStorage_OpenStorage(file2, stgA_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStorage failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ hr = IStorage_OpenStream(stg_tmp, strmA_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStream_Release(strm_tmp);
@@ -2903,12 +2903,12 @@ static void test_copyto_iidexclusions_stream(void)
hr = IStorage_OpenStorage(file2, stgB_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); + ok(hr == S_OK, "OpenStorage failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)){ hr = IStorage_OpenStream(stg_tmp, strmB_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStream_Release(strm_tmp);
@@ -2917,7 +2917,7 @@ static void test_copyto_iidexclusions_stream(void)
hr = IStorage_OpenStream(file2, strmC_name, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08lx\n", hr); if(SUCCEEDED(hr)) IStream_Release(strm_tmp);
@@ -2951,25 +2951,25 @@ static void test_rename(void)
/* create a substorage */ r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
/* create a stream in the substorage */ r = IStorage_CreateStream(stg2, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStream failed, hr=%08lx\n", r); IStream_Release(stm);
/* rename the stream */ r = IStorage_RenameElement(stg2, stmname, stmname2); - ok(r==S_OK, "IStorage->RenameElement failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->RenameElement failed, hr=%08lx\n", r);
/* cannot open stream with old name */ r = IStorage_OpenStream(stg2, stmname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(r==STG_E_FILENOTFOUND, "IStorage_OpenStream should fail, hr=%08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage_OpenStream should fail, hr=%08lx\n", r); if (SUCCEEDED(r)) IStream_Release(stm);
/* can open stream with new name */ r = IStorage_OpenStream(stg2, stmname2, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(r==S_OK, "IStorage_OpenStream failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage_OpenStream failed, hr=%08lx\n", r); if (SUCCEEDED(r)) IStream_Release(stm);
IStorage_Release(stg2); @@ -2979,17 +2979,17 @@ static void test_rename(void)
/* cannot open storage with old name */ r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg2); - ok(r==STG_E_FILENOTFOUND, "IStorage_OpenStream should fail, hr=%08x\n", r); + ok(r==STG_E_FILENOTFOUND, "IStorage_OpenStream should fail, hr=%08lx\n", r); if (SUCCEEDED(r)) IStorage_Release(stg2);
/* can open storage with new name */ r = IStorage_OpenStorage(stg, stgname2, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg2); - ok(r==S_OK, "IStorage_OpenStream should fail, hr=%08x\n", r); + ok(r==S_OK, "IStorage_OpenStream should fail, hr=%08lx\n", r); if (SUCCEEDED(r)) { /* opened storage still has the stream */ r = IStorage_OpenStream(stg2, stmname2, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(r==S_OK, "IStorage_OpenStream failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage_OpenStream failed, hr=%08lx\n", r); if (SUCCEEDED(r)) IStream_Release(stm);
IStorage_Release(stg2); @@ -3019,7 +3019,7 @@ static void test_toplevel_stat(void) ok(r==S_OK, "StgCreateDocfile failed\n");
r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); - ok(r==S_OK, "Storage_Stat failed with error 0x%08x\n", r); + ok(r==S_OK, "Storage_Stat failed with error 0x%08lx\n", r); ok(!strcmp_ww(stat.pwcsName, filename), "expected %s, got %s\n", wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); CoTaskMemFree(stat.pwcsName); @@ -3027,10 +3027,10 @@ static void test_toplevel_stat(void) IStorage_Release( stg );
r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r);
r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); - ok(r==S_OK, "Storage_Stat failed with error 0x%08x\n", r); + ok(r==S_OK, "Storage_Stat failed with error 0x%08lx\n", r); ok(!strcmp_ww(stat.pwcsName, filename), "expected %s, got %s\n", wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); CoTaskMemFree(stat.pwcsName); @@ -3054,7 +3054,7 @@ static void test_toplevel_stat(void) ok(r==S_OK, "StgCreateDocfile failed\n");
r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); - ok(r==S_OK, "Storage_Stat failed with error 0x%08x\n", r); + ok(r==S_OK, "Storage_Stat failed with error 0x%08lx\n", r); ok(!strcmp_ww(stat.pwcsName, filename), "expected %s, got %s\n", wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); CoTaskMemFree(stat.pwcsName); @@ -3062,10 +3062,10 @@ static void test_toplevel_stat(void) IStorage_Release( stg );
r = StgOpenStorage( rel_path, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); + ok(r==S_OK, "StgOpenStorage failed with error 0x%08lx\n", r);
r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); - ok(r==S_OK, "Storage_Stat failed with error 0x%08x\n", r); + ok(r==S_OK, "Storage_Stat failed with error 0x%08lx\n", r); ok(!strcmp_ww(stat.pwcsName, filename), "expected %s, got %s\n", wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); CoTaskMemFree(stat.pwcsName); @@ -3095,11 +3095,11 @@ static void test_substorage_enum(void)
/* create a substorage */ r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
/* create an enumelements */ r = IStorage_EnumElements(stg2, 0, NULL, 0, &ee); - ok(r==S_OK, "IStorage->EnumElements failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->EnumElements failed, hr=%08lx\n", r);
/* release the substorage */ ref = IStorage_Release(stg2); @@ -3107,14 +3107,14 @@ static void test_substorage_enum(void)
/* reopening fails, because the substorage is really still open */ r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage failed, hr=%08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage failed, hr=%08lx\n", r);
/* destroying the storage invalidates the enumerator */ r = IStorage_DestroyElement(stg, stgname); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
r = IEnumSTATSTG_Reset(ee); - ok(r==STG_E_REVERTED, "IEnumSTATSTG->Reset failed, hr=%08x\n", r); + ok(r==STG_E_REVERTED, "IEnumSTATSTG->Reset failed, hr=%08lx\n", r);
IEnumSTATSTG_Release(ee);
@@ -3143,29 +3143,29 @@ static void test_copyto_locking(void)
/* create a substorage */ r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
/* create another substorage */ r = IStorage_CreateStorage(stg, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
/* add a stream, and leave it open */ r = IStorage_CreateStream(stg2, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStream failed, hr=%08lx\n", r);
/* Try to copy the storage while the stream is open */ r = IStorage_CopyTo(stg2, 0, NULL, NULL, stg3); - ok(r==S_OK, "IStorage->CopyTo failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CopyTo failed, hr=%08lx\n", r);
IStream_Release(stm);
/* create a substorage */ r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg4); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
/* Try to copy the storage while the substorage is open */ r = IStorage_CopyTo(stg2, 0, NULL, NULL, stg3); - ok(r==S_OK, "IStorage->CopyTo failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CopyTo failed, hr=%08lx\n", r);
IStorage_Release(stg4); IStorage_Release(stg3); @@ -3193,31 +3193,31 @@ static void test_copyto_recursive(void)
/* create a substorage */ r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
/* copy the parent to the child */ r = IStorage_CopyTo(stg, 0, NULL, NULL, stg2); - ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08lx\n", r);
/* create a transacted substorage */ r = IStorage_CreateStorage(stg, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
/* copy the parent to the transacted child */ r = IStorage_CopyTo(stg, 0, NULL, NULL, stg2); - ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08lx\n", r);
/* create a transacted subsubstorage */ r = IStorage_CreateStorage(stg3, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, 0, &stg4); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08lx\n", r);
/* copy the parent to the transacted child of the transacted child */ r = IStorage_CopyTo(stg, 0, NULL, NULL, stg4); - ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08x\n", r); + ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08lx\n", r);
/* copy the parent but exclude storage objects */ r = IStorage_CopyTo(stg, 1, &IID_IStorage, NULL, stg4); - ok(r==S_OK, "IStorage->CopyTo failed, hr=%08x\n", r); + ok(r==S_OK, "IStorage->CopyTo failed, hr=%08lx\n", r);
IStorage_Release(stg4); IStorage_Release(stg3); @@ -3238,38 +3238,38 @@ static void test_hglobal_storage_creation(void) ULARGE_INTEGER offset;
r = CreateILockBytesOnHGlobal(NULL, TRUE, &ilb); - ok(r == S_OK, "CreateILockBytesOnHGlobal failed, hr=%x\n", r); + ok(r == S_OK, "CreateILockBytesOnHGlobal failed, hr=%lx\n", r);
offset.QuadPart = 0; memset(junk, 0xaa, 512); r = ILockBytes_WriteAt(ilb, offset, junk, 512, NULL); - ok(r == S_OK, "ILockBytes_WriteAt failed, hr=%x\n", r); + ok(r == S_OK, "ILockBytes_WriteAt failed, hr=%lx\n", r);
offset.QuadPart = 2000; r = ILockBytes_WriteAt(ilb, offset, junk, 512, NULL); - ok(r == S_OK, "ILockBytes_WriteAt failed, hr=%x\n", r); + ok(r == S_OK, "ILockBytes_WriteAt failed, hr=%lx\n", r);
r = StgCreateDocfileOnILockBytes(ilb, STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stg); - ok(r == S_OK, "StgCreateDocfileOnILockBytes failed, hr=%x\n", r); + ok(r == S_OK, "StgCreateDocfileOnILockBytes failed, hr=%lx\n", r);
IStorage_Release(stg);
r = StgOpenStorageOnILockBytes(ilb, NULL, STGM_READ|STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); - ok(r == S_OK, "StgOpenStorageOnILockBytes failed, hr=%x\n", r); + ok(r == S_OK, "StgOpenStorageOnILockBytes failed, hr=%lx\n", r);
if (SUCCEEDED(r)) { r = IStorage_Stat(stg, &stat, STATFLAG_NONAME); - ok(r == S_OK, "StgOpenStorageOnILockBytes failed, hr=%x\n", r); + ok(r == S_OK, "StgOpenStorageOnILockBytes failed, hr=%lx\n", r); ok(IsEqualCLSID(&stat.clsid, &GUID_NULL), "unexpected CLSID value\n");
IStorage_Release(stg); }
r = ILockBytes_Stat(ilb, &stat, STATFLAG_NONAME); - ok(r == S_OK, "ILockBytes_Stat failed, hr=%x\n", r); - ok(stat.cbSize.u.LowPart < 2512, "expected truncated size, got %d\n", stat.cbSize.u.LowPart); + ok(r == S_OK, "ILockBytes_Stat failed, hr=%lx\n", r); + ok(stat.cbSize.u.LowPart < 2512, "expected truncated size, got %ld\n", stat.cbSize.u.LowPart);
ILockBytes_Release(ilb); } @@ -3281,22 +3281,22 @@ static void test_convert(void) HRESULT hr;
hr = GetConvertStg(NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); ok(hr == S_OK, "StgCreateDocfile failed\n"); hr = GetConvertStg(stg); - ok(hr == STG_E_FILENOTFOUND, "got 0x%08x\n", hr); + ok(hr == STG_E_FILENOTFOUND, "got 0x%08lx\n", hr); hr = SetConvertStg(stg, TRUE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = SetConvertStg(stg, TRUE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = GetConvertStg(stg); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = SetConvertStg(stg, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = GetConvertStg(stg); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
IStorage_Release(stg);
@@ -3314,40 +3314,40 @@ static void test_direct_swmr(void) /* it's possible to create in writer mode */ hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | STGM_SHARE_DENY_WRITE | STGM_DIRECT_SWMR, 0, &stg); todo_wine - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if (hr == S_OK) { IStorage_Release(stg); DeleteFileW(fileW); }
hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | STGM_SHARE_DENY_WRITE | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); IStorage_Release(stg);
/* reader mode */ hr = StgOpenStorage(fileW, NULL, STGM_DIRECT_SWMR | STGM_READ | STGM_SHARE_DENY_NONE, NULL, 0, &stg); - ok(hr == S_OK || broken(hr == STG_E_INVALIDFLAG), "got %08x\n", hr); + ok(hr == S_OK || broken(hr == STG_E_INVALIDFLAG), "got %08lx\n", hr); if(hr == S_OK) { hr = IStorage_QueryInterface(stg, &IID_IDirectWriterLock, (void**)&dwlock); - ok(hr == E_NOINTERFACE, "got %08x\n", hr); + ok(hr == E_NOINTERFACE, "got %08lx\n", hr); IStorage_Release(stg); }
/* writer mode */ hr = StgOpenStorage(fileW, NULL, STGM_DIRECT_SWMR | STGM_READWRITE | STGM_SHARE_DENY_WRITE, NULL, 0, &stg); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if(hr == S_OK) { ref = IStorage_AddRef(stg); IStorage_Release(stg);
hr = IStorage_QueryInterface(stg, &IID_IDirectWriterLock, (void**)&dwlock); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ref2 = IStorage_AddRef(stg); IStorage_Release(stg); - ok(ref2 == ref + 1, "got %u\n", ref2); + ok(ref2 == ref + 1, "got %lu\n", ref2);
IDirectWriterLock_Release(dwlock); IStorage_Release(stg); @@ -3425,22 +3425,22 @@ static void check_sharing(LPCWSTR filename, const struct lock_test *current, if (!current->todo || (current->sharing & sharing)) ok(current->sharing & sharing || broken(!(current->sharing & sharing) && access == GENERIC_WRITE && (current->stg_mode & 0xf) != STGM_READ) /* win2k */, - "file with mode %x should not be openable with %s permission\n", current->stg_mode, desc); + "file with mode %lx should not be openable with %s permission\n", current->stg_mode, desc); else { todo_wine ok(current->sharing & sharing || broken(!(current->sharing & sharing) && access == GENERIC_WRITE && (current->stg_mode & 0xf) != STGM_READ) /* win2k */, - "file with mode %x should not be openable with %s permission\n", current->stg_mode, desc); + "file with mode %lx should not be openable with %s permission\n", current->stg_mode, desc); *any_failure = TRUE; } } else { if (!current->todo || !(current->sharing & sharing)) - ok(!(current->sharing & sharing), "file with mode %x should be openable with %s permission\n", current->stg_mode, desc); + ok(!(current->sharing & sharing), "file with mode %lx should be openable with %s permission\n", current->stg_mode, desc); else { - todo_wine ok(!(current->sharing & sharing), "file with mode %x should be openable with %s permission\n", current->stg_mode, desc); + todo_wine ok(!(current->sharing & sharing), "file with mode %lx should be openable with %s permission\n", current->stg_mode, desc); *any_failure = TRUE; } } @@ -3452,20 +3452,20 @@ static void check_access(LPCWSTR filename, const struct lock_test *current, if (can_open(filename, open_mode, (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE) & ~sharing)) { if (!current->todo || !(current->access & access)) - ok(!(current->access & access), "file with mode %x should not be openable without %s sharing\n", current->stg_mode, desc); + ok(!(current->access & access), "file with mode %lx should not be openable without %s sharing\n", current->stg_mode, desc); else { - todo_wine ok(!(current->access & access), "file with mode %x should not be openable without %s sharing\n", current->stg_mode, desc); + todo_wine ok(!(current->access & access), "file with mode %lx should not be openable without %s sharing\n", current->stg_mode, desc); *any_failure = TRUE; } } else { if (!current->todo || (current->access & access)) - ok(current->access & access, "file with mode %x should be openable without %s sharing\n", current->stg_mode, desc); + ok(current->access & access, "file with mode %lx should be openable without %s sharing\n", current->stg_mode, desc); else { - todo_wine ok(current->access & access, "file with mode %x should be openable without %s sharing\n", current->stg_mode, desc); + todo_wine ok(current->access & access, "file with mode %lx should be openable without %s sharing\n", current->stg_mode, desc); *any_failure = TRUE; } } @@ -3487,18 +3487,18 @@ static void test_locking(void) if (current->create) { hr = StgCreateDocfile(filename, current->stg_mode, 0, &stg); - ok(SUCCEEDED(hr), "StgCreateDocfile with mode %x failed with hr %x\n", current->stg_mode, hr); + ok(SUCCEEDED(hr), "StgCreateDocfile with mode %lx failed with hr %lx\n", current->stg_mode, hr); if (FAILED(hr)) continue; } else { hr = StgCreateDocfile(filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(SUCCEEDED(hr), "StgCreateDocfile failed with hr %x\n", hr); + ok(SUCCEEDED(hr), "StgCreateDocfile failed with hr %lx\n", hr); if (FAILED(hr)) continue; IStorage_Release(stg);
hr = StgOpenStorage(filename, NULL, current->stg_mode, NULL, 0, &stg); - ok(SUCCEEDED(hr), "StgOpenStorage with mode %x failed with hr %x\n", current->stg_mode, hr); + ok(SUCCEEDED(hr), "StgOpenStorage with mode %lx failed with hr %lx\n", current->stg_mode, hr); if (FAILED(hr)) { DeleteFileW(filename); @@ -3522,7 +3522,7 @@ static void test_locking(void) check_access(filename, current, DELETE, FILE_SHARE_DELETE, "DELETE", open_mode, &any_failure);
hfile = CreateFileW(filename, open_mode, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "couldn't open file with mode %x\n", current->stg_mode); + ok(hfile != INVALID_HANDLE_VALUE, "couldn't open file with mode %lx\n", current->stg_mode);
ol.u.s.OffsetHigh = 0; ol.hEvent = NULL; @@ -3548,12 +3548,12 @@ static void test_locking(void) expect_locked = FALSE;
if (!current->todo || locked == expect_locked) - ok(locked == expect_locked, "byte %x of file with mode %x is %slocked but should %sbe\n", + ok(locked == expect_locked, "byte %lx of file with mode %lx is %slocked but should %sbe\n", ol.u.s.Offset, current->stg_mode, locked?"":"not ", expect_locked?"":"not "); else { any_failure = TRUE; - todo_wine ok(locked == expect_locked, "byte %x of file with mode %x is %slocked but should %sbe\n", + todo_wine ok(locked == expect_locked, "byte %lx of file with mode %lx is %slocked but should %sbe\n", ol.u.s.Offset, current->stg_mode, locked?"":"not ", expect_locked?"":"not "); } } @@ -3571,7 +3571,7 @@ static void test_locking(void) const int* next_range = current->fail_ranges;
hfile = CreateFileW(filename, open_mode, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "couldn't open file with mode %x\n", current->stg_mode); + ok(hfile != INVALID_HANDLE_VALUE, "couldn't open file with mode %lx\n", current->stg_mode);
ol.u.s.OffsetHigh = 0; ol.hEvent = NULL; @@ -3589,7 +3589,7 @@ static void test_locking(void) LockFileEx(hfile, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &ol);
hr = StgOpenStorage(filename, NULL, current->stg_mode, NULL, 0, &stg); - ok(hr == S_OK || hr == STG_E_LOCKVIOLATION || hr == STG_E_SHAREVIOLATION, "failed with unexpected hr %x\n", hr); + ok(hr == S_OK || hr == STG_E_LOCKVIOLATION || hr == STG_E_SHAREVIOLATION, "failed with unexpected hr %lx\n", hr); if (SUCCEEDED(hr)) IStorage_Release(stg);
UnlockFileEx(hfile, 0, 1, 0, &ol); @@ -3607,12 +3607,12 @@ static void test_locking(void) }
if (!current->todo || failed == expect_failed) - ok(failed == expect_failed, "open with byte %x locked, mode %x %s but should %s\n", + ok(failed == expect_failed, "open with byte %lx locked, mode %lx %s but should %s\n", ol.u.s.Offset, current->stg_mode, failed?"failed":"succeeded", expect_failed?"fail":"succeed"); else { any_failure = TRUE; - todo_wine ok(failed == expect_failed, "open with byte %x locked, mode %x %s but should %s\n", + todo_wine ok(failed == expect_failed, "open with byte %lx locked, mode %lx %s but should %s\n", ol.u.s.Offset, current->stg_mode, failed?"failed":"succeeded", expect_failed?"fail":"succeed"); } } @@ -3623,7 +3623,7 @@ static void test_locking(void) DeleteFileW(filename);
if (current->todo && !any_failure) - todo_wine ok(1, "tests succeeded for mode %x\n", current->stg_mode); + todo_wine ok(1, "tests succeeded for mode %lx\n", current->stg_mode); } }
@@ -3644,99 +3644,99 @@ static void test_transacted_shared(void) /* create a new transacted storage with a stream */ r = StgCreateDocfile(filename, STGM_CREATE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed %x\n", r); + ok(r==S_OK, "StgCreateDocfile failed %lx\n", r);
r = WriteClassStg(stg, &test_stg_cls); - ok(r == S_OK, "WriteClassStg failed %x\n", r); + ok(r == S_OK, "WriteClassStg failed %lx\n", r);
r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed %x\n", r); + ok(r==S_OK, "IStorage->CreateStream failed %lx\n", r);
pos.QuadPart = 0; r = IStream_Seek(stm, pos, 0, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
r = IStream_Write(stm, "aaa", 3, NULL); - ok(r==S_OK, "IStream->Write failed %x\n", r); + ok(r==S_OK, "IStream->Write failed %lx\n", r);
r = IStorage_Commit(stg, STGC_ONLYIFCURRENT); - ok(r==S_OK, "IStorage->Commit failed %x\n", r); + ok(r==S_OK, "IStorage->Commit failed %lx\n", r);
/* open a second transacted read/write storage */ r = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_TRANSACTED | STGM_SHARE_DENY_NONE, NULL, 0, &stgrw); - ok(r==S_OK, "StgOpenStorage failed %x\n", r); + ok(r==S_OK, "StgOpenStorage failed %lx\n", r);
/* update stream on the first storage and commit */ pos.QuadPart = 0; r = IStream_Seek(stm, pos, 0, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
r = IStream_Write(stm, "ccc", 3, NULL); - ok(r==S_OK, "IStream->Write failed %x\n", r); + ok(r==S_OK, "IStream->Write failed %lx\n", r);
r = IStorage_Commit(stg, STGC_ONLYIFCURRENT); - ok(r==S_OK, "IStorage->Commit failed %x\n", r); + ok(r==S_OK, "IStorage->Commit failed %lx\n", r);
/* update again without committing */ pos.QuadPart = 0; r = IStream_Seek(stm, pos, 0, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
r = IStream_Write(stm, "ddd", 3, NULL); - ok(r==S_OK, "IStream->Write failed %x\n", r); + ok(r==S_OK, "IStream->Write failed %lx\n", r);
IStream_Release(stm);
/* we can still read the old content from the second storage */ r = IStorage_OpenStream(stgrw, stmname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(r==S_OK, "IStorage->OpenStream failed %x\n", r); + ok(r==S_OK, "IStorage->OpenStream failed %lx\n", r);
pos.QuadPart = 0; r = IStream_Seek(stm, pos, 0, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
r = IStream_Read(stm, buffer, sizeof(buffer), &bytesread); - ok(r==S_OK, "IStream->Read failed %x\n", r); - ok(bytesread == 3, "read wrong number of bytes %i\n", bytesread); + ok(r==S_OK, "IStream->Read failed %lx\n", r); + ok(bytesread == 3, "read wrong number of bytes %li\n", bytesread); ok(memcmp(buffer, "aaa", 3) == 0, "wrong data\n");
/* and overwrite the data */ pos.QuadPart = 0; r = IStream_Seek(stm, pos, 0, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
r = IStream_Write(stm, "bbb", 3, NULL); - ok(r==S_OK, "IStream->Write failed %x\n", r); + ok(r==S_OK, "IStream->Write failed %lx\n", r);
IStream_Release(stm);
/* commit fails because we're out of date */ r = IStorage_Commit(stgrw, STGC_ONLYIFCURRENT); - ok(r==STG_E_NOTCURRENT, "IStorage->Commit failed %x\n", r); + ok(r==STG_E_NOTCURRENT, "IStorage->Commit failed %lx\n", r);
/* unless we force it */ r = IStorage_Commit(stgrw, STGC_DEFAULT); - ok(r==S_OK, "IStorage->Commit failed %x\n", r); + ok(r==S_OK, "IStorage->Commit failed %lx\n", r);
/* reverting gets us back to the last commit from the same storage */ r = IStorage_Revert(stg); - ok(r==S_OK, "IStorage->Revert failed %x\n", r); + ok(r==S_OK, "IStorage->Revert failed %lx\n", r);
r = IStorage_OpenStream(stg, stmname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed %x\n", r); + ok(r==S_OK, "IStorage->CreateStream failed %lx\n", r);
pos.QuadPart = 0; r = IStream_Seek(stm, pos, 0, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
r = IStream_Read(stm, buffer, sizeof(buffer), &bytesread); - ok(r==S_OK, "IStream->Read failed %x\n", r); - ok(bytesread == 3, "read wrong number of bytes %i\n", bytesread); + ok(r==S_OK, "IStream->Read failed %lx\n", r); + ok(bytesread == 3, "read wrong number of bytes %li\n", bytesread); ok(memcmp(buffer, "ccc", 3) == 0, "wrong data\n");
/* and committing fails forever */ r = IStorage_Commit(stg, STGC_ONLYIFCURRENT); - ok(r==STG_E_NOTCURRENT, "IStorage->Commit failed %x\n", r); + ok(r==STG_E_NOTCURRENT, "IStorage->Commit failed %lx\n", r);
IStream_Release(stm);
@@ -3764,71 +3764,71 @@ static void test_overwrite(void) DeleteFileA(filenameA);
r = StgCreateDocfile(filename, STGM_CREATE | STGM_READWRITE | STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed %x\n", r); + ok(r==S_OK, "StgCreateDocfile failed %lx\n", r);
r = WriteClassStg(stg, &test_stg_cls); - ok(r == S_OK, "WriteClassStg failed %x\n", r); + ok(r == S_OK, "WriteClassStg failed %lx\n", r);
r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed %x\n", r); + ok(r==S_OK, "IStorage->CreateStream failed %lx\n", r);
pos.QuadPart = 0; r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
memset(buffer, 'a', sizeof(buffer)); for (i=0; i<4; i++) { /* Write enough bytes to pass the minimum storage file size */ r = IStream_Write(stm, buffer, sizeof(buffer), NULL); - ok(r==S_OK, "IStream->Write failed %x\n", r); + ok(r==S_OK, "IStream->Write failed %lx\n", r); }
r = IStorage_Commit(stg, STGC_DEFAULT); - ok(r==S_OK, "IStorage->Commit failed %x\n", r); + ok(r==S_OK, "IStorage->Commit failed %lx\n", r);
hfile = CreateFileA(filenameA, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL); - ok(hfile != NULL, "couldn't open file %d\n", GetLastError()); + ok(hfile != NULL, "couldn't open file %ld\n", GetLastError());
orig_size = GetFileSize(hfile, NULL);
pos.QuadPart = 0; r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
r = IStream_Write(stm, "b", 1, NULL); - ok(r==S_OK, "IStream->Write failed %x\n", r); + ok(r==S_OK, "IStream->Write failed %lx\n", r);
r = IStorage_Commit(stg, STGC_OVERWRITE); - ok(r==S_OK, "IStorage->Commit failed %x\n", r); + ok(r==S_OK, "IStorage->Commit failed %lx\n", r);
new_size = GetFileSize(hfile, NULL);
- todo_wine ok(new_size == orig_size, "file grew from %d bytes to %d\n", orig_size, new_size); + todo_wine ok(new_size == orig_size, "file grew from %ld bytes to %ld\n", orig_size, new_size);
IStream_Release(stm);
IStorage_RenameElement(stg, stmname, stmname2);
r = IStorage_Commit(stg, STGC_OVERWRITE); - ok(r==S_OK, "IStorage->Commit failed %x\n", r); + ok(r==S_OK, "IStorage->Commit failed %lx\n", r);
new_size = GetFileSize(hfile, NULL);
- todo_wine ok(new_size == orig_size, "file grew from %d bytes to %d\n", orig_size, new_size); + todo_wine ok(new_size == orig_size, "file grew from %ld bytes to %ld\n", orig_size, new_size);
IStorage_Release(stg);
r = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_TRANSACTED | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed %x\n", r); + ok(r==S_OK, "StgOpenStorage failed %lx\n", r);
r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed %x\n", r); + ok(r==S_OK, "IStorage->CreateStream failed %lx\n", r);
r = IStream_Read(stm, buffer, sizeof(buffer), &bytesread); - ok(r==S_OK, "IStream->Write failed %x\n", r); - ok(bytesread == sizeof(buffer), "only read %d bytes\n", bytesread); + ok(r==S_OK, "IStream->Write failed %lx\n", r); + ok(bytesread == sizeof(buffer), "only read %ld bytes\n", bytesread); ok(buffer[0] == 'b', "unexpected data at byte 0\n");
for (i=1; i<sizeof(buffer); i++) @@ -3838,17 +3838,17 @@ static void test_overwrite(void)
pos.QuadPart = 0; r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); - ok(r==S_OK, "IStream->Seek failed %x\n", r); + ok(r==S_OK, "IStream->Seek failed %lx\n", r);
r = IStream_Write(stm, "c", 1, NULL); - ok(r==S_OK, "IStream->Write failed %x\n", r); + ok(r==S_OK, "IStream->Write failed %lx\n", r);
r = IStorage_Commit(stg, STGC_OVERWRITE); - ok(r==S_OK, "IStorage->Commit failed %x\n", r); + ok(r==S_OK, "IStorage->Commit failed %lx\n", r);
new_size = GetFileSize(hfile, NULL);
- todo_wine ok(new_size == orig_size, "file grew from %d bytes to %d\n", orig_size, new_size); + todo_wine ok(new_size == orig_size, "file grew from %ld bytes to %ld\n", orig_size, new_size);
IStream_Release(stm);
@@ -3870,10 +3870,10 @@ static void test_custom_lockbytes(void) CreateTestLockBytes(&lockbytes);
hr = StgCreateDocfileOnILockBytes(&lockbytes->ILockBytes_iface, STGM_CREATE|STGM_READWRITE|STGM_TRANSACTED, 0, &stg); - ok(hr==S_OK, "StgCreateDocfileOnILockBytes failed %x\n", hr); + ok(hr==S_OK, "StgCreateDocfileOnILockBytes failed %lx\n", hr);
hr = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, 0, &stm); - ok(hr==S_OK, "IStorage_CreateStream failed %x\n", hr); + ok(hr==S_OK, "IStorage_CreateStream failed %lx\n", hr);
IStream_Write(stm, "Hello World!", 12, NULL); IStream_Release(stm); @@ -3881,9 +3881,9 @@ static void test_custom_lockbytes(void) memset(lockbytes->contents, 0, lockbytes->buffer_size);
hr = IStorage_Commit(stg, 0); - ok(hr==S_OK, "IStorage_Commit failed %x\n", hr); + ok(hr==S_OK, "IStorage_Commit failed %lx\n", hr);
- ok(*(DWORD *)lockbytes->contents == 0xe011cfd0, "contents: %08x\n", *(DWORD *)lockbytes->contents); + ok(*(DWORD *)lockbytes->contents == 0xe011cfd0, "contents: %08lx\n", *(DWORD *)lockbytes->contents);
IStorage_Release(stg);
@@ -3892,34 +3892,34 @@ static void test_custom_lockbytes(void) lockbytes->locks_supported = LOCK_WRITE|LOCK_EXCLUSIVE|LOCK_ONLYONCE;
hr = StgCreateDocfileOnILockBytes(&lockbytes->ILockBytes_iface, STGM_CREATE|STGM_READWRITE|STGM_TRANSACTED, 0, &stg); - ok(hr==S_OK, "StgCreateDocfileOnILockBytes failed %x\n", hr); + ok(hr==S_OK, "StgCreateDocfileOnILockBytes failed %lx\n", hr);
hr = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, 0, &stm); - ok(hr==S_OK, "IStorage_CreateStream failed %x\n", hr); + ok(hr==S_OK, "IStorage_CreateStream failed %lx\n", hr);
IStream_Write(stm, "Hello World!", 12, NULL); IStream_Release(stm);
hr = IStorage_Commit(stg, 0); - ok(hr==S_OK, "IStorage_Commit failed %x\n", hr); + ok(hr==S_OK, "IStorage_Commit failed %lx\n", hr);
ok(lockbytes->lock_called, "expected LockRegion to be called\n");
- ok(*(DWORD *)lockbytes->contents == 0xe011cfd0, "contents: %08x\n", *(DWORD *)lockbytes->contents); + ok(*(DWORD *)lockbytes->contents == 0xe011cfd0, "contents: %08lx\n", *(DWORD *)lockbytes->contents);
memset(lockbytes->contents, 0, lockbytes->buffer_size);
hr = IStorage_Commit(stg, 0); - ok(hr==STG_E_INVALIDHEADER, "IStorage_Commit should fail: %x\n", hr); + ok(hr==STG_E_INVALIDHEADER, "IStorage_Commit should fail: %lx\n", hr);
- ok(*(DWORD *)lockbytes->contents == 0, "contents: %08x\n", *(DWORD *)lockbytes->contents); + ok(*(DWORD *)lockbytes->contents == 0, "contents: %08lx\n", *(DWORD *)lockbytes->contents);
IStorage_Release(stg);
lockbytes->lock_hr = STG_E_INVALIDFUNCTION;
hr = StgCreateDocfileOnILockBytes(&lockbytes->ILockBytes_iface, STGM_CREATE|STGM_READWRITE|STGM_TRANSACTED, 0, &stg); - ok(hr==STG_E_INVALIDFUNCTION, "StgCreateDocfileOnILockBytes failed %x\n", hr); + ok(hr==STG_E_INVALIDFUNCTION, "StgCreateDocfileOnILockBytes failed %lx\n", hr);
DeleteTestLockBytes(lockbytes); } @@ -3931,7 +3931,7 @@ START_TEST(storage32) GetTempPathA(MAX_PATH, temp); if(!GetTempFileNameA(temp, "stg", 0, filenameA)) { - win_skip("Could not create temp file, %u\n", GetLastError()); + win_skip("Could not create temp file, %lu\n", GetLastError()); return; } MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filename, MAX_PATH); diff --git a/dlls/ole32/tests/usrmarshal.c b/dlls/ole32/tests/usrmarshal.c index fa281abbaaf..96cb0b4c669 100644 --- a/dlls/ole32/tests/usrmarshal.c +++ b/dlls/ole32/tests/usrmarshal.c @@ -110,11 +110,11 @@ static DWORD CALLBACK host_object_proc(LPVOID p) IMessageFilter * prev_filter = NULL; hr = CoRegisterMessageFilter(data->filter, &prev_filter); if (prev_filter) IMessageFilter_Release(prev_filter); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); }
hr = CoMarshalInterface(data->stream, &data->iid, data->object, MSHCTX_INPROC, NULL, data->marshal_flags); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* force the message queue to be created before signaling parent thread */ PeekMessageA(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); @@ -164,7 +164,7 @@ static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, static void end_host_object(DWORD tid, HANDLE thread) { BOOL ret = PostThreadMessageA(tid, WM_QUIT, 0, 0); - ok(ret, "PostThreadMessage failed with error %d\n", GetLastError()); + ok(ret, "PostThreadMessage failed with error %ld\n", GetLastError()); /* be careful of races - don't return until hosting thread has terminated */ ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); CloseHandle(thread); @@ -196,19 +196,19 @@ static void test_marshal_CLIPFORMAT(void) size = CLIPFORMAT_UserSize(&umcb.Flags, 1, &cf); ok(size == 12 + sizeof(cf_marshaled) || broken(size == 16 + sizeof(cf_marshaled)), /* win64 adds 4 extra (unused) bytes */ - "CLIPFORMAT: Wrong size %d\n", size); + "CLIPFORMAT: Wrong size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset( buffer, 0xcc, size ); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = CLIPFORMAT_UserMarshal(&umcb.Flags, buffer + 1, &cf); ok(buffer_end == buffer + 12 + sizeof(cf_marshaled), "got %p buffer %p\n", buffer_end, buffer); - ok(*(LONG *)(buffer + 4) == WDT_REMOTE_CALL, "CLIPFORMAT: Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(LONG *)(buffer + 0)); - ok(*(DWORD *)(buffer + 8) == cf, "CLIPFORMAT: Marshaled value should be 0x%04x instead of 0x%04x\n", cf, *(DWORD *)(buffer + 4)); + ok(*(LONG *)(buffer + 4) == WDT_REMOTE_CALL, "CLIPFORMAT: Context should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(LONG *)(buffer + 0)); + ok(*(DWORD *)(buffer + 8) == cf, "CLIPFORMAT: Marshaled value should be 0x%04x instead of 0x%04lx\n", cf, *(DWORD *)(buffer + 4)); ok(!memcmp(buffer + 12, cf_marshaled, min( sizeof(cf_marshaled), size-12 )), "Marshaled data differs\n"); if (size > sizeof(cf_marshaled) + 12) /* make sure the extra bytes are not used */ for (i = sizeof(cf_marshaled) + 12; i < size; i++) - ok( buffer[i] == 0xcc, "buffer offset %u has been set to %x\n", i, buffer[i] ); + ok( buffer[i] == 0xcc, "buffer offset %lu has been set to %x\n", i, buffer[i] );
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = CLIPFORMAT_UserUnmarshal(&umcb.Flags, buffer + 1, &cf2); @@ -233,15 +233,15 @@ static void test_marshal_HWND(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); size = HWND_UserSize(&umcb.Flags, 1, &hwnd); - ok(size == 4 + sizeof(*wirehwnd), "Wrong size %d\n", size); + ok(size == 4 + sizeof(*wirehwnd), "Wrong size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HWND_UserMarshal(&umcb.Flags, buffer + 1, &hwnd); ok(buffer_end == buffer + size, "got %p buffer %p\n", buffer_end, buffer); wirehwnd = (wireHWND)(buffer + 4); - ok(wirehwnd->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08x\n", wirehwnd->fContext); - ok(wirehwnd->u.hInproc == (LONG_PTR)hwnd, "Marshaled value should be %p instead of %x\n", hwnd, wirehwnd->u.hRemote); + ok(wirehwnd->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08lx\n", wirehwnd->fContext); + ok(wirehwnd->u.hInproc == (LONG_PTR)hwnd, "Marshaled value should be %p instead of %lx\n", hwnd, wirehwnd->u.hRemote);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HWND_UserUnmarshal(&umcb.Flags, buffer + 1, &hwnd2); @@ -270,12 +270,12 @@ static void test_marshal_HGLOBAL(void) size = HGLOBAL_UserSize(&umcb.Flags, 0, &hglobal); /* native is poorly programmed and allocates 4/8 bytes more than it needs to * here - Wine doesn't have to emulate that */ - ok((size == 8) || broken(size == 12) || broken(size == 16), "Size should be 8, instead of %d\n", size); + ok((size == 8) || broken(size == 12) || broken(size == 16), "Size should be 8, instead of %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); HGLOBAL_UserMarshal(&umcb.Flags, buffer, &hglobal); wirehglobal = buffer; - ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(ULONG *)wirehglobal); + ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(ULONG *)wirehglobal); wirehglobal += sizeof(ULONG); ok(*(ULONG *)wirehglobal == 0, "buffer+4 should be HGLOBAL\n"); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); @@ -305,20 +305,20 @@ static void test_marshal_HGLOBAL(void) ok(size == expected_size || broken(size == expected_size + 4) || broken(size == expected_size + 8), - "%d: got size %d\n", block_size, size); + "%ld: got size %ld\n", block_size, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); HGLOBAL_UserMarshal(&umcb.Flags, buffer, &hglobal); wirehglobal = buffer; - ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(ULONG *)wirehglobal); + ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(ULONG *)wirehglobal); wirehglobal += sizeof(ULONG); ok(*(ULONG *)wirehglobal == (ULONG)(ULONG_PTR)hglobal, "buffer+0x4 should be HGLOBAL\n"); wirehglobal += sizeof(ULONG); - ok(*(ULONG *)wirehglobal == actual_size, "%d: buffer+0x8 %08x\n", block_size, *(ULONG *)wirehglobal); + ok(*(ULONG *)wirehglobal == actual_size, "%ld: buffer+0x8 %08lx\n", block_size, *(ULONG *)wirehglobal); wirehglobal += sizeof(ULONG); ok(*(ULONG *)wirehglobal == (ULONG)(ULONG_PTR)hglobal, "buffer+0xc should be HGLOBAL\n"); wirehglobal += sizeof(ULONG); - ok(*(ULONG *)wirehglobal == actual_size, "%d: buffer+0x10 %08x\n", block_size, *(ULONG *)wirehglobal); + ok(*(ULONG *)wirehglobal == actual_size, "%ld: buffer+0x10 %08lx\n", block_size, *(ULONG *)wirehglobal); wirehglobal += sizeof(ULONG); for (i = 0; i < block_size; i++) ok(wirehglobal[i] == i, "buffer+0x%x should be %d\n", 0x10 + i, i); @@ -357,21 +357,21 @@ static void test_marshal_HENHMETAFILE(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = HENHMETAFILE_UserSize(&umcb.Flags, 1, &hemf); - ok(size > 24, "size should be at least 24 bytes, not %d\n", size); + ok(size > 24, "size should be at least 24 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = HENHMETAFILE_UserMarshal(&umcb.Flags, buffer + 1, &hemf); ok(buffer_end == buffer + size, "got %p buffer %p\n", buffer_end, buffer); wirehemf = buffer + 4; - ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehemf); + ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehemf); wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08x\n", *(DWORD *)wirehemf); + ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08lx\n", *(DWORD *)wirehemf); wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == (size - 0x14), "wirestgm + 0x8 should be size - 0x14 instead of 0x%08x\n", *(DWORD *)wirehemf); + ok(*(DWORD *)wirehemf == (size - 0x14), "wirestgm + 0x8 should be size - 0x14 instead of 0x%08lx\n", *(DWORD *)wirehemf); wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == (size - 0x14), "wirestgm + 0xc should be size - 0x14 instead of 0x%08x\n", *(DWORD *)wirehemf); + ok(*(DWORD *)wirehemf == (size - 0x14), "wirestgm + 0xc should be size - 0x14 instead of 0x%08lx\n", *(DWORD *)wirehemf); wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == EMR_HEADER, "wirestgm + 0x10 should be EMR_HEADER instead of %d\n", *(DWORD *)wirehemf); + ok(*(DWORD *)wirehemf == EMR_HEADER, "wirestgm + 0x10 should be EMR_HEADER instead of %ld\n", *(DWORD *)wirehemf); /* ... rest of data not tested - refer to tests for GetEnhMetaFileBits * at this point */
@@ -389,15 +389,15 @@ static void test_marshal_HENHMETAFILE(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = HENHMETAFILE_UserSize(&umcb.Flags, 1, &hemf); - ok(size == 12, "size should be 12 bytes, not %d\n", size); + ok(size == 12, "size should be 12 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = HENHMETAFILE_UserMarshal(&umcb.Flags, buffer + 1, &hemf); ok(buffer_end == buffer + size, "got %p buffer %p\n", buffer_end, buffer); wirehemf = buffer + 4; - ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehemf); + ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehemf); wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08x\n", *(DWORD *)wirehemf); + ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08lx\n", *(DWORD *)wirehemf);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = HENHMETAFILE_UserUnmarshal(&umcb.Flags, buffer + 1, &hemf2); @@ -431,20 +431,20 @@ static void test_marshal_HMETAFILE(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = HMETAFILE_UserSize(&umcb.Flags, 0, &hmf); - ok(size > 20, "size should be at least 20 bytes, not %d\n", size); + ok(size > 20, "size should be at least 20 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); HMETAFILE_UserMarshal(&umcb.Flags, buffer, &hmf); wirehmf = buffer; - ok(*(DWORD *)wirehmf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmf); + ok(*(DWORD *)wirehmf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehmf); wirehmf += sizeof(DWORD); - ok(*(DWORD *)wirehmf == (DWORD)(DWORD_PTR)hmf, "wirestgm + 0x4 should be hmf instead of 0x%08x\n", *(DWORD *)wirehmf); + ok(*(DWORD *)wirehmf == (DWORD)(DWORD_PTR)hmf, "wirestgm + 0x4 should be hmf instead of 0x%08lx\n", *(DWORD *)wirehmf); wirehmf += sizeof(DWORD); - ok(*(DWORD *)wirehmf == (size - 0x10), "wirestgm + 0x8 should be size - 0x10 instead of 0x%08x\n", *(DWORD *)wirehmf); + ok(*(DWORD *)wirehmf == (size - 0x10), "wirestgm + 0x8 should be size - 0x10 instead of 0x%08lx\n", *(DWORD *)wirehmf); wirehmf += sizeof(DWORD); - ok(*(DWORD *)wirehmf == (size - 0x10), "wirestgm + 0xc should be size - 0x10 instead of 0x%08x\n", *(DWORD *)wirehmf); + ok(*(DWORD *)wirehmf == (size - 0x10), "wirestgm + 0xc should be size - 0x10 instead of 0x%08lx\n", *(DWORD *)wirehmf); wirehmf += sizeof(DWORD); - ok(*(WORD *)wirehmf == 1, "wirestgm + 0x10 should be 1 instead of 0x%08x\n", *(DWORD *)wirehmf); + ok(*(WORD *)wirehmf == 1, "wirestgm + 0x10 should be 1 instead of 0x%08lx\n", *(DWORD *)wirehmf); wirehmf += sizeof(DWORD); /* ... rest of data not tested - refer to tests for GetMetaFileBits * at this point */ @@ -460,14 +460,14 @@ static void test_marshal_HMETAFILE(void) hmf = NULL;
size = HMETAFILE_UserSize(&umcb.Flags, 0, &hmf); - ok(size == 8, "size should be 8 bytes, not %d\n", size); + ok(size == 8, "size should be 8 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); HMETAFILE_UserMarshal(&umcb.Flags, buffer, &hmf); wirehmf = buffer; - ok(*(DWORD *)wirehmf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmf); + ok(*(DWORD *)wirehmf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehmf); wirehmf += sizeof(DWORD); - ok(*(DWORD *)wirehmf == (DWORD)(DWORD_PTR)hmf, "wirestgm + 0x4 should be hmf instead of 0x%08x\n", *(DWORD *)wirehmf); + ok(*(DWORD *)wirehmf == (DWORD)(DWORD_PTR)hmf, "wirestgm + 0x4 should be hmf instead of 0x%08lx\n", *(DWORD *)wirehmf); wirehmf += sizeof(DWORD);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -503,36 +503,36 @@ static void test_marshal_HMETAFILEPICT(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = HMETAFILEPICT_UserSize(&umcb.Flags, 1, &hmfp); - ok(size > 24, "size should be at least 24 bytes, not %d\n", size); + ok(size > 24, "size should be at least 24 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = HMETAFILEPICT_UserMarshal(&umcb.Flags, buffer + 1, &hmfp); wirehmfp = buffer + 4; - ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)hmfp, "wirestgm + 0x4 should be hmf instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)hmfp, "wirestgm + 0x4 should be hmf instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == MM_ISOTROPIC, "wirestgm + 0x8 should be MM_ISOTROPIC instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == MM_ISOTROPIC, "wirestgm + 0x8 should be MM_ISOTROPIC instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == 1, "wirestgm + 0xc should be 1 instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == 1, "wirestgm + 0xc should be 1 instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == 2, "wirestgm + 0x10 should be 2 instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == 2, "wirestgm + 0x10 should be 2 instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == USER_MARSHAL_PTR_PREFIX, "wirestgm + 0x14 should be "User" instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == USER_MARSHAL_PTR_PREFIX, "wirestgm + 0x14 should be "User" instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x18 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x18 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); pmfp = GlobalLock(hmfp); - ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)pmfp->hMF, "wirestgm + 0x1c should be pmfp->hMF instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)pmfp->hMF, "wirestgm + 0x1c should be pmfp->hMF instead of 0x%08lx\n", *(DWORD *)wirehmfp); GlobalUnlock(hmfp); wirehmfp += sizeof(DWORD); /* Note use (buffer_end - buffer) instead of size here, because size is an * overestimate with native */ - ok(*(DWORD *)wirehmfp == (buffer_end - buffer - 0x2c), "wirestgm + 0x20 should be size - 0x34 instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == (buffer_end - buffer - 0x2c), "wirestgm + 0x20 should be size - 0x34 instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == (buffer_end - buffer - 0x2c), "wirestgm + 0x24 should be size - 0x34 instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == (buffer_end - buffer - 0x2c), "wirestgm + 0x24 should be size - 0x34 instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(WORD *)wirehmfp == 1, "wirehmfp + 0x28 should be 1 instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(WORD *)wirehmfp == 1, "wirehmfp + 0x28 should be 1 instead of 0x%08lx\n", *(DWORD *)wirehmfp); /* ... rest of data not tested - refer to tests for GetMetaFileBits * at this point */
@@ -552,15 +552,15 @@ static void test_marshal_HMETAFILEPICT(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = HMETAFILEPICT_UserSize(&umcb.Flags, 1, &hmfp); - ok(size == 12, "size should be 12 bytes, not %d\n", size); + ok(size == 12, "size should be 12 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = HMETAFILEPICT_UserMarshal(&umcb.Flags, buffer + 1, &hmfp); ok(buffer_end == buffer + size, "got %p buffer %p\n", buffer_end, buffer); wirehmfp = buffer + 4; - ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)hmfp, "wirestgm + 0x4 should be hmf instead of 0x%08x\n", *(DWORD *)wirehmfp); + ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)hmfp, "wirestgm + 0x4 should be hmf instead of 0x%08lx\n", *(DWORD *)wirehmfp); wirehmfp += sizeof(DWORD);
hmfp2 = NULL; @@ -702,7 +702,7 @@ static void marshal_WdtpInterfacePointer(DWORD umcb_ctx, DWORD ctx, BOOL client, unk = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, umcb_ctx); size = WdtpInterfacePointer_UserSize(&umcb.Flags, ctx, 0, unk, &IID_IUnknown); - ok(size == 0, "size should be 0 bytes, not %d\n", size); + ok(size == 0, "size should be 0 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, ctx, buffer, unk, &IID_IUnknown); ok(buffer_end == buffer, "buffer_end %p buffer %p\n", buffer_end, buffer); @@ -721,23 +721,23 @@ static void marshal_WdtpInterfacePointer(DWORD umcb_ctx, DWORD ctx, BOOL client, marshal_size = pos.u.LowPart; marshal_data = GlobalLock(h); todo_wine - ok(Test_Unknown.refs == 2, "got %d\n", Test_Unknown.refs); + ok(Test_Unknown.refs == 2, "got %ld\n", Test_Unknown.refs);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, umcb_ctx); size = WdtpInterfacePointer_UserSize(&umcb.Flags, ctx, 0, unk, &IID_IUnknown); - ok(size >= marshal_size + 2 * sizeof(DWORD), "marshal size %x got %x\n", marshal_size, size); + ok(size >= marshal_size + 2 * sizeof(DWORD), "marshal size %lx got %lx\n", marshal_size, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, umcb_ctx); buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, ctx, buffer, unk, &IID_IUnknown); todo_wine - ok(Test_Unknown.refs == 2, "got %d\n", Test_Unknown.refs); + ok(Test_Unknown.refs == 2, "got %ld\n", Test_Unknown.refs); wireip = buffer;
ok(buffer_end == buffer + marshal_size + 2 * sizeof(DWORD), "buffer_end %p buffer %p\n", buffer_end, buffer);
- ok(*(DWORD *)wireip == marshal_size, "wireip + 0x0 should be %x instead of %x\n", marshal_size, *(DWORD *)wireip); + ok(*(DWORD *)wireip == marshal_size, "wireip + 0x0 should be %lx instead of %lx\n", marshal_size, *(DWORD *)wireip); wireip += sizeof(DWORD); - ok(*(DWORD *)wireip == marshal_size, "wireip + 0x4 should be %x instead of %x\n", marshal_size, *(DWORD *)wireip); + ok(*(DWORD *)wireip == marshal_size, "wireip + 0x4 should be %lx instead of %lx\n", marshal_size, *(DWORD *)wireip); wireip += sizeof(DWORD);
ok(!memcmp(marshal_data, wireip, marshal_size), "buffer mismatch\n"); @@ -756,8 +756,8 @@ static void marshal_WdtpInterfacePointer(DWORD umcb_ctx, DWORD ctx, BOOL client,
WdtpInterfacePointer_UserUnmarshal(&umcb.Flags, buffer, &unk2, &IID_IUnknown); ok(unk2 != NULL, "IUnknown object didn't unmarshal properly\n"); - ok(Test_Unknown.refs == 2, "got %d\n", Test_Unknown.refs); - ok(Test_Unknown2.refs == 0, "got %d\n", Test_Unknown2.refs); + ok(Test_Unknown.refs == 2, "got %ld\n", Test_Unknown.refs); + ok(Test_Unknown2.refs == 0, "got %ld\n", Test_Unknown2.refs); HeapFree(GetProcessHeap(), 0, buffer); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_INPROC); IUnknown_Release(unk2); @@ -820,14 +820,14 @@ static void marshal_STGMEDIUM(BOOL client, BOOL in, BOOL out)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = STGMEDIUM_UserSize(&umcb.Flags, 0, &med); - ok(size == expect_size, "size %d should be %d bytes\n", size, expect_size); + ok(size == expect_size, "size %ld should be %ld bytes\n", size, expect_size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = STGMEDIUM_UserMarshal(&umcb.Flags, buffer, &med); ok(buffer_end - buffer == expect_buffer_end - expect_buffer, "buffer size mismatch\n"); - ok(*(DWORD*)buffer == TYMED_NULL, "got %08x\n", *(DWORD*)buffer); - ok(*((DWORD*)buffer+1) != 0, "got %08x\n", *((DWORD*)buffer+1)); + ok(*(DWORD*)buffer == TYMED_NULL, "got %08lx\n", *(DWORD*)buffer); + ok(*((DWORD*)buffer+1) != 0, "got %08lx\n", *((DWORD*)buffer+1)); ok(!memcmp(buffer+8, expect_buffer + 8, expect_buffer_end - expect_buffer - 8), "buffer mismatch\n");
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -842,9 +842,9 @@ static void marshal_STGMEDIUM(BOOL client, BOOL in, BOOL out)
STGMEDIUM_UserUnmarshal(&umcb.Flags, buffer, &med2);
- ok(med2.tymed == TYMED_NULL, "got tymed %x\n", med2.tymed); + ok(med2.tymed == TYMED_NULL, "got tymed %lx\n", med2.tymed); ok(med2.pUnkForRelease != NULL, "Incorrectly unmarshalled\n"); - ok(Test_Unknown2.refs == 0, "got %d\n", Test_Unknown2.refs); + ok(Test_Unknown2.refs == 0, "got %ld\n", Test_Unknown2.refs);
HeapFree(GetProcessHeap(), 0, buffer); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); @@ -858,7 +858,7 @@ static void marshal_STGMEDIUM(BOOL client, BOOL in, BOOL out) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); STGMEDIUM_UserFree(&umcb.Flags, &med2);
- ok(Test_Unknown.refs == 1, "got %d\n", Test_Unknown.refs); + ok(Test_Unknown.refs == 1, "got %ld\n", Test_Unknown.refs);
HeapFree(GetProcessHeap(), 0, expect_buffer);
@@ -887,16 +887,16 @@ static void marshal_STGMEDIUM(BOOL client, BOOL in, BOOL out)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = STGMEDIUM_UserSize(&umcb.Flags, 0, &med); - ok(size == expect_size, "size %d should be %d bytes\n", size, expect_size); + ok(size == expect_size, "size %ld should be %ld bytes\n", size, expect_size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = STGMEDIUM_UserMarshal(&umcb.Flags, buffer, &med); ok(buffer_end - buffer == expect_buffer_end - expect_buffer, "buffer size mismatch\n"); - ok(*(DWORD*)buffer == TYMED_ISTREAM, "got %08x\n", *(DWORD*)buffer); - ok(*((DWORD*)buffer+1) != 0, "got %08x\n", *((DWORD*)buffer+1)); - ok(*((DWORD*)buffer+2) != 0, "got %08x\n", *((DWORD*)buffer+2)); + ok(*(DWORD*)buffer == TYMED_ISTREAM, "got %08lx\n", *(DWORD*)buffer); + ok(*((DWORD*)buffer+1) != 0, "got %08lx\n", *((DWORD*)buffer+1)); + ok(*((DWORD*)buffer+2) != 0, "got %08lx\n", *((DWORD*)buffer+2)); ok(!memcmp(buffer + 12, expect_buffer + 12, (buffer_end - buffer) - 12), "buffer mismatch\n");
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -912,11 +912,11 @@ static void marshal_STGMEDIUM(BOOL client, BOOL in, BOOL out)
STGMEDIUM_UserUnmarshal(&umcb.Flags, buffer, &med2);
- ok(med2.tymed == TYMED_ISTREAM, "got tymed %x\n", med2.tymed); + ok(med2.tymed == TYMED_ISTREAM, "got tymed %lx\n", med2.tymed); ok(U(med2).pstm != NULL, "Incorrectly unmarshalled\n"); ok(med2.pUnkForRelease != NULL, "Incorrectly unmarshalled\n"); - ok(Test_Stream2.refs == 0, "got %d\n", Test_Stream2.refs); - ok(Test_Unknown2.refs == 0, "got %d\n", Test_Unknown2.refs); + ok(Test_Stream2.refs == 0, "got %ld\n", Test_Stream2.refs); + ok(Test_Unknown2.refs == 0, "got %ld\n", Test_Unknown2.refs);
HeapFree(GetProcessHeap(), 0, buffer); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); @@ -930,8 +930,8 @@ static void marshal_STGMEDIUM(BOOL client, BOOL in, BOOL out) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); STGMEDIUM_UserFree(&umcb.Flags, &med2);
- ok(Test_Unknown.refs == 1, "got %d\n", Test_Unknown.refs); - ok(Test_Stream.refs == 1, "got %d\n", Test_Stream.refs); + ok(Test_Unknown.refs == 1, "got %ld\n", Test_Unknown.refs); + ok(Test_Stream.refs == 1, "got %ld\n", Test_Stream.refs);
HeapFree(GetProcessHeap(), 0, expect_buffer);
@@ -946,16 +946,16 @@ static void marshal_STGMEDIUM(BOOL client, BOOL in, BOOL out)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = STGMEDIUM_UserSize(&umcb.Flags, 0, &med); - ok(size == expect_size, "size %d should be %d bytes\n", size, expect_size); + ok(size == expect_size, "size %ld should be %ld bytes\n", size, expect_size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); buffer_end = STGMEDIUM_UserMarshal(&umcb.Flags, buffer, &med); ok(buffer_end - buffer == expect_size, "buffer size mismatch\n"); - ok(*(DWORD*)buffer == TYMED_ISTREAM, "got %08x\n", *(DWORD*)buffer); - ok(*((DWORD*)buffer+1) == 0, "got %08x\n", *((DWORD*)buffer+1)); - ok(*((DWORD*)buffer+2) == 0, "got %08x\n", *((DWORD*)buffer+2)); + ok(*(DWORD*)buffer == TYMED_ISTREAM, "got %08lx\n", *(DWORD*)buffer); + ok(*((DWORD*)buffer+1) == 0, "got %08lx\n", *((DWORD*)buffer+1)); + ok(*((DWORD*)buffer+2) == 0, "got %08lx\n", *((DWORD*)buffer+2));
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); umcb.pStubMsg->IsClient = client; @@ -970,11 +970,11 @@ static void marshal_STGMEDIUM(BOOL client, BOOL in, BOOL out)
STGMEDIUM_UserUnmarshal(&umcb.Flags, buffer, &med2);
- ok(med2.tymed == TYMED_ISTREAM, "got tymed %x\n", med2.tymed); + ok(med2.tymed == TYMED_ISTREAM, "got tymed %lx\n", med2.tymed); ok(U(med2).pstm == NULL, "Incorrectly unmarshalled\n"); ok(med2.pUnkForRelease == &Test_Unknown2.IUnknown_iface, "Incorrectly unmarshalled\n"); - ok(Test_Stream2.refs == 0, "got %d\n", Test_Stream2.refs); - ok(Test_Unknown2.refs == 1, "got %d\n", Test_Unknown2.refs); + ok(Test_Stream2.refs == 0, "got %ld\n", Test_Stream2.refs); + ok(Test_Unknown2.refs == 1, "got %ld\n", Test_Unknown2.refs);
HeapFree(GetProcessHeap(), 0, buffer); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); @@ -1011,12 +1011,12 @@ static void test_marshal_SNB(void) snb = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); size = SNB_UserSize(&umcb.Flags, 3, &snb); - ok(size == 16, "Size should be 16, instead of %d\n", size); + ok(size == 16, "Size should be 16, instead of %ld\n", size);
/* NULL block */ init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); size = SNB_UserSize(&umcb.Flags, 0, &snb); - ok(size == 12, "Size should be 12, instead of %d\n", size); + ok(size == 12, "Size should be 12, instead of %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); @@ -1024,9 +1024,9 @@ static void test_marshal_SNB(void) ok(mbuf == buffer + size, "got %p, %p\n", mbuf, buffer + size);
wiresnb = (RemSNB*)buffer; - ok(wiresnb->ulCntStr == 0, "got %u\n", wiresnb->ulCntStr); - ok(wiresnb->ulCntChar == 0, "got %u\n", wiresnb->ulCntChar); - ok(*(ULONG*)wiresnb->rgString == 0, "got %u\n", *(ULONG*)wiresnb->rgString); + ok(wiresnb->ulCntStr == 0, "got %lu\n", wiresnb->ulCntStr); + ok(wiresnb->ulCntChar == 0, "got %lu\n", wiresnb->ulCntChar); + ok(*(ULONG*)wiresnb->rgString == 0, "got %lu\n", *(ULONG*)wiresnb->rgString);
snb2 = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); @@ -1054,17 +1054,17 @@ static void test_marshal_SNB(void) snb = (SNB)src; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); size = SNB_UserSize(&umcb.Flags, 0, &snb); - ok(size == 38, "Size should be 38, instead of %d\n", size); + ok(size == 38, "Size should be 38, instead of %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); SNB_UserMarshal(&umcb.Flags, buffer, &snb);
wiresnb = (RemSNB*)buffer; - ok(wiresnb->ulCntStr == 13, "got %u\n", wiresnb->ulCntStr); - ok(wiresnb->ulCntChar == 2, "got %u\n", wiresnb->ulCntChar); + ok(wiresnb->ulCntStr == 13, "got %lu\n", wiresnb->ulCntStr); + ok(wiresnb->ulCntChar == 2, "got %lu\n", wiresnb->ulCntChar); /* payload length is stored one more time, as ULONG */ - ok(*(ULONG*)wiresnb->rgString == wiresnb->ulCntStr, "got %u\n", *(ULONG*)wiresnb->rgString); + ok(*(ULONG*)wiresnb->rgString == wiresnb->ulCntStr, "got %lu\n", *(ULONG*)wiresnb->rgString); dataW = &wiresnb->rgString[2]; ok(!lstrcmpW(dataW, str1W), "marshalled string 0: %s\n", wine_dbgstr_w(dataW)); dataW += ARRAY_SIZE(str1W); @@ -1106,15 +1106,15 @@ static void test_marshal_HDC(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); size = HDC_UserSize(&umcb.Flags, 1, &hdc); - ok(size == 4 + sizeof(*wirehdc), "Wrong size %d\n", size); + ok(size == 4 + sizeof(*wirehdc), "Wrong size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HDC_UserMarshal(&umcb.Flags, buffer + 1, &hdc); ok(buffer_end == buffer + 4 + sizeof(*wirehdc), "got %p buffer %p\n", buffer_end, buffer); wirehdc = (wireHDC)(buffer + 4); - ok(wirehdc->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08x\n", wirehdc->fContext); - ok(wirehdc->u.hInproc == (LONG_PTR)hdc, "Marshaled value should be %p instead of %x\n", hdc, wirehdc->u.hRemote); + ok(wirehdc->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08lx\n", wirehdc->fContext); + ok(wirehdc->u.hInproc == (LONG_PTR)hdc, "Marshaled value should be %p instead of %lx\n", hdc, wirehdc->u.hRemote);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HDC_UserUnmarshal(&umcb.Flags, buffer + 1, &hdc2); @@ -1143,15 +1143,15 @@ static void test_marshal_HICON(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); size = HICON_UserSize(&umcb.Flags, 1, &hIcon); - ok(size == 4 + sizeof(*wirehicon), "Wrong size %d\n", size); + ok(size == 4 + sizeof(*wirehicon), "Wrong size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HICON_UserMarshal(&umcb.Flags, buffer + 1, &hIcon); ok(buffer_end == buffer + 4 + sizeof(*wirehicon), "got %p buffer %p\n", buffer_end, buffer); wirehicon = (wireHICON)(buffer + 4); - ok(wirehicon->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08x\n", wirehicon->fContext); - ok(wirehicon->u.hInproc == (LONG_PTR)hIcon, "Marshaled value should be %p instead of %x\n", hIcon, wirehicon->u.hRemote); + ok(wirehicon->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08lx\n", wirehicon->fContext); + ok(wirehicon->u.hInproc == (LONG_PTR)hIcon, "Marshaled value should be %p instead of %lx\n", hIcon, wirehicon->u.hRemote);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HICON_UserUnmarshal(&umcb.Flags, buffer + 1, &hIcon2); @@ -1184,15 +1184,15 @@ static void test_marshal_HBRUSH(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); size = HBRUSH_UserSize(&umcb.Flags, 1, &hBrush); - ok(size == 4 + sizeof(*wirehbrush), "Wrong size %d\n", size); + ok(size == 4 + sizeof(*wirehbrush), "Wrong size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HBRUSH_UserMarshal(&umcb.Flags, buffer + 1, &hBrush); ok(buffer_end == buffer + 4 + sizeof(*wirehbrush), "got %p buffer %p\n", buffer_end, buffer); wirehbrush = (wireHBRUSH)(buffer + 4); - ok(wirehbrush->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08x\n", wirehbrush->fContext); - ok(wirehbrush->u.hInproc == (LONG_PTR)hBrush, "Marshaled value should be %p instead of %x\n", hBrush, wirehbrush->u.hRemote); + ok(wirehbrush->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08lx\n", wirehbrush->fContext); + ok(wirehbrush->u.hInproc == (LONG_PTR)hBrush, "Marshaled value should be %p instead of %lx\n", hBrush, wirehbrush->u.hRemote);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HBRUSH_UserUnmarshal(&umcb.Flags, buffer + 1, &hBrush2); @@ -1226,13 +1226,13 @@ static void test_marshal_HBITMAP(void)
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_INPROC); size = HBITMAP_UserSize(&umcb.Flags, 1, &hBitmap); - ok(size == 0xc, "Wrong size %d\n", size); + ok(size == 0xc, "Wrong size %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size + 4); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_INPROC); buffer_end = HBITMAP_UserMarshal(&umcb.Flags, buffer + 1, &hBitmap); - ok(buffer_end == buffer + 0xc, "HBITMAP_UserMarshal() returned wrong size %d\n", (LONG)(buffer_end - buffer)); - ok(*(ULONG *)(buffer + 0x4) == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08x\n", *(ULONG *)(buffer + 0x4)); - ok(*(ULONG *)(buffer + 0x8) == (ULONG)(ULONG_PTR)hBitmap, "wirestgm + 0x4 should be bitmap handle instead of 0x%08x\n", *(ULONG *)(buffer + 0x8)); + ok(buffer_end == buffer + 0xc, "HBITMAP_UserMarshal() returned wrong size %ld\n", (LONG)(buffer_end - buffer)); + ok(*(ULONG *)(buffer + 0x4) == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08lx\n", *(ULONG *)(buffer + 0x4)); + ok(*(ULONG *)(buffer + 0x8) == (ULONG)(ULONG_PTR)hBitmap, "wirestgm + 0x4 should be bitmap handle instead of 0x%08lx\n", *(ULONG *)(buffer + 0x8));
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_INPROC); HBITMAP_UserUnmarshal(&umcb.Flags, buffer + 1, &hBitmap2); @@ -1246,15 +1246,15 @@ static void test_marshal_HBITMAP(void) size = HBITMAP_UserSize(&umcb.Flags, 1, &hBitmap); ok(size == 0x10 + header_size + bitmap_size || broken(size == 0x14 + header_size + bitmap_size), /* Windows adds 4 extra (unused) bytes */ - "Wrong size %d\n", size); + "Wrong size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size + 4); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); buffer_end = HBITMAP_UserMarshal(&umcb.Flags, buffer + 1, &hBitmap); - ok(buffer_end == buffer + 0x10 + header_size + bitmap_size, "HBITMAP_UserMarshal() returned wrong size %d\n", (LONG)(buffer_end - buffer)); - ok(*(ULONG *)(buffer + 0x4) == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(ULONG *)buffer); - ok(*(ULONG *)(buffer + 0x8) == (ULONG)(ULONG_PTR)hBitmap, "wirestgm + 0x4 should be bitmap handle instead of 0x%08x\n", *(ULONG *)(buffer + 0x4)); - ok(*(ULONG *)(buffer + 0xc) == (ULONG)(ULONG_PTR)bitmap_size, "wirestgm + 0x8 should be bitmap size instead of 0x%08x\n", *(ULONG *)(buffer + 0x4)); + ok(buffer_end == buffer + 0x10 + header_size + bitmap_size, "HBITMAP_UserMarshal() returned wrong size %ld\n", (LONG)(buffer_end - buffer)); + ok(*(ULONG *)(buffer + 0x4) == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08lx\n", *(ULONG *)buffer); + ok(*(ULONG *)(buffer + 0x8) == (ULONG)(ULONG_PTR)hBitmap, "wirestgm + 0x4 should be bitmap handle instead of 0x%08lx\n", *(ULONG *)(buffer + 0x4)); + ok(*(ULONG *)(buffer + 0xc) == (ULONG)(ULONG_PTR)bitmap_size, "wirestgm + 0x8 should be bitmap size instead of 0x%08lx\n", *(ULONG *)(buffer + 0x4)); ok(!memcmp(buffer + 0x10, bitmap, header_size), "buffer mismatch\n"); ok(!memcmp(buffer + 0x10 + header_size, bmp_bits, bitmap_size), "buffer mismatch\n");
@@ -1347,12 +1347,12 @@ static void test_GetDataHere_Proxy(void) STGMEDIUM med;
hr = CreateStreamOnHGlobal( NULL, TRUE, &stm ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); tid = start_host_object2( stm, &IID_IDataObject, (IUnknown *)&obj.IDataObject_iface, MSHLFLAGS_NORMAL, NULL, &thread );
IStream_Seek( stm, zero, STREAM_SEEK_SET, NULL ); hr = CoUnmarshalInterface( stm, &IID_IDataObject, (void **)&data ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); IStream_Release( stm );
Test_Stream.refs = 1; @@ -1368,33 +1368,33 @@ static void test_GetDataHere_Proxy(void)
fmt.tymed = med.tymed = TYMED_NULL; hr = IDataObject_GetDataHere( data, &fmt, &med ); - ok( hr == DV_E_TYMED, "got %08x\n", hr ); + ok( hr == DV_E_TYMED, "got %08lx\n", hr );
for (fmt.tymed = TYMED_HGLOBAL; fmt.tymed <= TYMED_ENHMF; fmt.tymed <<= 1) { med.tymed = fmt.tymed; hr = IDataObject_GetDataHere( data, &fmt, &med ); - ok( hr == (fmt.tymed <= TYMED_ISTORAGE ? S_OK : DV_E_TYMED), "got %08x for tymed %d\n", hr, fmt.tymed ); - ok( Test_Unknown.refs == 1, "got %d\n", Test_Unknown.refs ); + ok( hr == (fmt.tymed <= TYMED_ISTORAGE ? S_OK : DV_E_TYMED), "got %08lx for tymed %ld\n", hr, fmt.tymed ); + ok( Test_Unknown.refs == 1, "got %ld\n", Test_Unknown.refs ); }
fmt.tymed = TYMED_ISTREAM; med.tymed = TYMED_ISTORAGE; hr = IDataObject_GetDataHere( data, &fmt, &med ); - ok( hr == DV_E_TYMED, "got %08x\n", hr ); + ok( hr == DV_E_TYMED, "got %08lx\n", hr );
fmt.tymed = med.tymed = TYMED_ISTREAM; U(med).pstm = &Test_Stream.IStream_iface; med.pUnkForRelease = &Test_Unknown.IUnknown_iface;
hr = IDataObject_GetDataHere( data, &fmt, &med ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
ok( U(med).pstm == &Test_Stream.IStream_iface, "stm changed\n" ); ok( med.pUnkForRelease == &Test_Unknown.IUnknown_iface, "punk changed\n" );
- ok( Test_Stream.refs == 1, "got %d\n", Test_Stream.refs ); - ok( Test_Unknown.refs == 1, "got %d\n", Test_Unknown.refs ); + ok( Test_Stream.refs == 1, "got %ld\n", Test_Stream.refs ); + ok( Test_Unknown.refs == 1, "got %ld\n", Test_Unknown.refs );
fmt.cfFormat = 2; fmt.tymed = med.tymed = TYMED_ISTREAM; @@ -1402,14 +1402,14 @@ static void test_GetDataHere_Proxy(void) med.pUnkForRelease = &Test_Unknown.IUnknown_iface;
hr = IDataObject_GetDataHere( data, &fmt, &med ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
ok( U(med).pstm == &Test_Stream.IStream_iface, "stm changed\n" ); ok( med.pUnkForRelease == &Test_Unknown.IUnknown_iface, "punk changed\n" );
- ok( Test_Stream.refs == 1, "got %d\n", Test_Stream.refs ); - ok( Test_Unknown.refs == 1, "got %d\n", Test_Unknown.refs ); - ok( Test_Stream2.refs == 0, "got %d\n", Test_Stream2.refs ); + ok( Test_Stream.refs == 1, "got %ld\n", Test_Stream.refs ); + ok( Test_Unknown.refs == 1, "got %ld\n", Test_Unknown.refs ); + ok( Test_Stream2.refs == 0, "got %ld\n", Test_Stream2.refs );
IDataObject_Release( data ); end_host_object( tid, thread );
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109587
Your paranoid android.
=== w7u_adm (32 bit report) ===
ole32: compobj.c:3078: Test failed: CoWaitForMultipleHandles didn't pump all WM_DDE_FIRST messages compobj.c:3081: Test failed: PeekMessageA failed, error 1400 compobj.c:3082: Test failed: expected msg.message = WM_QUIT, got 0 compobj.c:3083: Test failed: expected msg.wParam = 42, got 0
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleacc/tests/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/oleacc/tests/main.c b/dlls/oleacc/tests/main.c index 6b0000e5f56..379611e17d8 100644 --- a/dlls/oleacc/tests/main.c +++ b/dlls/oleacc/tests/main.c @@ -538,7 +538,7 @@ static void test_GetStateText(void) ok(!ret, "31) GetStateText succeeded: %d\n", ret); }
-static int Object_ref = 1; +static LONG Object_ref = 1; static HRESULT WINAPI Object_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) { if(IsEqualIID(riid, &IID_IUnknown)) {
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleacc/tests/Makefile.in | 1 dlls/oleacc/tests/main.c | 358 +++++++++++++++++++++-------------------- 2 files changed, 179 insertions(+), 180 deletions(-)
diff --git a/dlls/oleacc/tests/Makefile.in b/dlls/oleacc/tests/Makefile.in index c9cddafd3eb..7773ba911e3 100644 --- a/dlls/oleacc/tests/Makefile.in +++ b/dlls/oleacc/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = oleacc.dll IMPORTS = ole32 oleacc oleaut32 user32
diff --git a/dlls/oleacc/tests/main.c b/dlls/oleacc/tests/main.c index 379611e17d8..85f9a085953 100644 --- a/dlls/oleacc/tests/main.c +++ b/dlls/oleacc/tests/main.c @@ -579,34 +579,34 @@ static void test_LresultFromObject(const char *name) LRESULT lres;
lres = LresultFromObject(NULL, 0, 0); - ok(lres == E_INVALIDARG, "got %lx\n", lres); + ok(lres == E_INVALIDARG, "got %Ix\n", lres);
hres = ObjectFromLresult(0, &IID_IUnknown, 0, (void**)&unk); - ok(hres == E_FAIL, "got %x\n", hres); + ok(hres == E_FAIL, "got %lx\n", hres); hres = ObjectFromLresult(0x10000, &IID_IUnknown, 0, (void**)&unk); - ok(hres == E_FAIL, "got %x\n", hres); + ok(hres == E_FAIL, "got %lx\n", hres);
- ok(Object_ref == 1, "Object_ref = %d\n", Object_ref); + ok(Object_ref == 1, "Object_ref = %ld\n", Object_ref); lres = LresultFromObject(&IID_IUnknown, 0, &Object); - ok(SUCCEEDED(lres), "got %lx\n", lres); - ok(Object_ref > 1, "Object_ref = %d\n", Object_ref); + ok(SUCCEEDED(lres), "got %Ix\n", lres); + ok(Object_ref > 1, "Object_ref = %ld\n", Object_ref);
hres = ObjectFromLresult(lres, &IID_IUnknown, 0, (void**)&unk); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); ok(unk == &Object, "unk != &Object\n"); IUnknown_Release(unk); - ok(Object_ref == 1, "Object_ref = %d\n", Object_ref); + ok(Object_ref == 1, "Object_ref = %ld\n", Object_ref);
lres = LresultFromObject(&IID_IUnknown, 0, &Object); - ok(SUCCEEDED(lres), "got %lx\n", lres); - ok(Object_ref > 1, "Object_ref = %d\n", Object_ref); + ok(SUCCEEDED(lres), "got %Ix\n", lres); + ok(Object_ref > 1, "Object_ref = %ld\n", Object_ref);
sprintf(cmdline, ""%s" main ObjectFromLresult %s", name, wine_dbgstr_longlong(lres)); memset(&startup, 0, sizeof(startup)); startup.cb = sizeof(startup); CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &proc); wait_child_process(proc.hProcess); - ok(Object_ref == 1, "Object_ref = %d\n", Object_ref); + ok(Object_ref == 1, "Object_ref = %ld\n", Object_ref); }
static LRESULT WINAPI test_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) @@ -614,11 +614,11 @@ static LRESULT WINAPI test_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA switch(msg) { case WM_GETOBJECT: if(lparam == OBJID_QUERYCLASSNAMEIDX) { - ok(!wparam, "wparam = %lx\n", wparam); + ok(!wparam, "wparam = %Ix\n", wparam); return 0; }
- ok(wparam==0xffffffff, "wparam = %lx\n", wparam); + ok(wparam==0xffffffff, "wparam = %Ix\n", wparam); if(lparam == (DWORD)OBJID_CURSOR) return E_UNEXPECTED; if(lparam == (DWORD)OBJID_CLIENT) @@ -628,7 +628,7 @@ static LRESULT WINAPI test_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA if(lparam == 1) return LresultFromObject(&IID_IUnknown, wparam, (IUnknown*)&Accessible);
- ok(0, "unexpected (%ld)\n", lparam); + ok(0, "unexpected (%Id)\n", lparam); return 0; }
@@ -659,10 +659,10 @@ static void test_AccessibleObjectFromWindow(void) HWND hwnd;
hr = AccessibleObjectFromWindow(NULL, OBJID_CURSOR, &IID_IUnknown, NULL); - ok(hr == E_INVALIDARG, "got %x\n", hr); + ok(hr == E_INVALIDARG, "got %lx\n", hr);
hr = AccessibleObjectFromWindow(NULL, OBJID_CURSOR, &IID_IUnknown, (void**)&unk); - todo_wine ok(hr == S_OK, "got %x\n", hr); + todo_wine ok(hr == S_OK, "got %lx\n", hr); if(hr == S_OK) IUnknown_Release(unk);
hwnd = CreateWindowA("oleacc_test", "test", WS_OVERLAPPEDWINDOW, @@ -670,12 +670,12 @@ static void test_AccessibleObjectFromWindow(void) ok(hwnd != NULL, "CreateWindow failed\n");
hr = AccessibleObjectFromWindow(hwnd, OBJID_CURSOR, &IID_IUnknown, (void**)&unk); - ok(hr == E_UNEXPECTED, "got %x\n", hr); + ok(hr == E_UNEXPECTED, "got %lx\n", hr);
- ok(Object_ref == 1, "Object_ref = %d\n", Object_ref); + ok(Object_ref == 1, "Object_ref = %ld\n", Object_ref); hr = AccessibleObjectFromWindow(hwnd, OBJID_CLIENT, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "got %x\n", hr); - ok(Object_ref == 2, "Object_ref = %d\n", Object_ref); + ok(hr == S_OK, "got %lx\n", hr); + ok(Object_ref == 2, "Object_ref = %ld\n", Object_ref); IUnknown_Release(unk);
DestroyWindow(hwnd); @@ -693,16 +693,16 @@ static void test_AccessibleObjectFromEvent(void) ok(hwnd != NULL, "CreateWindow failed\n");
hr = AccessibleObjectFromEvent(NULL, OBJID_CLIENT, CHILDID_SELF, &acc, &cid); - ok(hr == E_FAIL, "got %#x\n", hr); + ok(hr == E_FAIL, "got %#lx\n", hr);
hr = AccessibleObjectFromEvent(hwnd, OBJID_CLIENT, CHILDID_SELF, NULL, &cid); - ok(hr == E_INVALIDARG, "got %#x\n", hr); + ok(hr == E_INVALIDARG, "got %#lx\n", hr);
acc = (IAccessible*)0xdeadbeef; V_VT(&cid) = VT_UNKNOWN; V_UNKNOWN(&cid) = (IUnknown*)0xdeadbeef; hr = AccessibleObjectFromEvent(hwnd, OBJID_CLIENT, CHILDID_SELF, &acc, &cid); - ok(hr == E_NOINTERFACE || broken(hr == S_OK), "got %#x\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == S_OK), "got %#lx\n", hr); if (hr == S_OK) IAccessible_Release(acc); else @@ -712,20 +712,20 @@ static void test_AccessibleObjectFromEvent(void) }
hr = AccessibleObjectFromEvent(hwnd, OBJID_CURSOR, CHILDID_SELF, &acc, &cid); - ok(hr == E_UNEXPECTED, "got %#x\n", hr); + ok(hr == E_UNEXPECTED, "got %#lx\n", hr);
SET_EXPECT(Accessible_get_accChild); hr = AccessibleObjectFromEvent(hwnd, 1, 1, &acc, &cid); CHECK_CALLED(Accessible_get_accChild); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); todo_wine ok(!iface_cmp((IUnknown*)acc, (IUnknown*)&Accessible), "acc == &Accessible\n"); ok(V_VT(&cid) == VT_I4, "got %#x, expected %#x\n", V_VT(&cid), VT_I4); - ok(V_I4(&cid) == 1, "got %#x, expected 1\n", V_I4(&cid)); + ok(V_I4(&cid) == 1, "got %#lx, expected 1\n", V_I4(&cid)); SET_EXPECT(Accessible_get_accParent); SET_EXPECT(Accessible_get_accName); V_I4(&cid) = 0; hr = IAccessible_get_accName(acc, cid, NULL); - ok(hr == E_INVALIDARG, "get_accName returned %x\n", hr); + ok(hr == E_INVALIDARG, "get_accName returned %lx\n", hr); todo_wine CHECK_CALLED(Accessible_get_accParent); CHECK_CALLED(Accessible_get_accName); IAccessible_Release(acc); @@ -733,15 +733,15 @@ static void test_AccessibleObjectFromEvent(void) SET_EXPECT(Accessible_get_accChild); hr = AccessibleObjectFromEvent(hwnd, 1, 2, &acc, &cid); CHECK_CALLED(Accessible_get_accChild); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); todo_wine ok(!iface_cmp((IUnknown*)acc, (IUnknown*)&Accessible), "acc == &Accessible\n"); ok(V_VT(&cid) == VT_I4, "got %#x, expected %#x\n", V_VT(&cid), VT_I4); - ok(V_I4(&cid) == 2, "got %#x, expected 2\n", V_I4(&cid)); + ok(V_I4(&cid) == 2, "got %#lx, expected 2\n", V_I4(&cid)); SET_EXPECT(Accessible_get_accParent); SET_EXPECT(Accessible_get_accName); V_I4(&cid) = 0; hr = IAccessible_get_accName(acc, cid, NULL); - ok(hr == E_INVALIDARG, "get_accName returned %x\n", hr); + ok(hr == E_INVALIDARG, "get_accName returned %lx\n", hr); todo_wine CHECK_CALLED(Accessible_get_accParent); CHECK_CALLED(Accessible_get_accName); IAccessible_Release(acc); @@ -749,14 +749,14 @@ static void test_AccessibleObjectFromEvent(void) SET_EXPECT(Accessible_get_accChild); hr = AccessibleObjectFromEvent(hwnd, 1, 3, &acc, &cid); CHECK_CALLED(Accessible_get_accChild); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); todo_wine ok(!iface_cmp((IUnknown*)acc, (IUnknown*)&Accessible_child), "acc == &Accessible_child\n"); ok(V_VT(&cid) == VT_I4, "got %#x, expected %#x\n", V_VT(&cid), VT_I4); - ok(V_I4(&cid) == CHILDID_SELF, "got %#x, expected %#x\n", V_I4(&cid), CHILDID_SELF); + ok(V_I4(&cid) == CHILDID_SELF, "got %#lx, expected %#x\n", V_I4(&cid), CHILDID_SELF); SET_EXPECT(Accessible_child_get_accParent); SET_EXPECT(Accessible_child_get_accName); hr = IAccessible_get_accName(acc, cid, NULL); - ok(hr == E_INVALIDARG, "get_accName returned %x\n", hr); + ok(hr == E_INVALIDARG, "get_accName returned %lx\n", hr); todo_wine CHECK_CALLED(Accessible_child_get_accParent); CHECK_CALLED(Accessible_child_get_accName); IAccessible_Release(acc); @@ -764,13 +764,13 @@ static void test_AccessibleObjectFromEvent(void) SET_EXPECT(Accessible_get_accChild); hr = AccessibleObjectFromEvent(hwnd, 1, 4, &acc, &cid); CHECK_CALLED(Accessible_get_accChild); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(acc == &Accessible_child, "acc != &Accessible_child\n"); ok(V_VT(&cid) == VT_I4, "got %#x, expected %#x\n", V_VT(&cid), VT_I4); - ok(V_I4(&cid) == CHILDID_SELF, "got %#x, expected %#x\n", V_I4(&cid), CHILDID_SELF); + ok(V_I4(&cid) == CHILDID_SELF, "got %#lx, expected %#x\n", V_I4(&cid), CHILDID_SELF); SET_EXPECT(Accessible_child_get_accName); hr = IAccessible_get_accName(acc, cid, NULL); - ok(hr == E_INVALIDARG, "get_accName returned %x\n", hr); + ok(hr == E_INVALIDARG, "get_accName returned %lx\n", hr); CHECK_CALLED(Accessible_child_get_accName); IAccessible_Release(acc);
@@ -803,37 +803,37 @@ static void test_AccessibleChildren(IAccessible *acc)
count = -1; hr = AccessibleChildren(NULL, 0, 0, children, &count); - ok(hr == E_INVALIDARG, "AccessibleChildren returned %x\n", hr); - ok(count == -1, "count = %d\n", count); + ok(hr == E_INVALIDARG, "AccessibleChildren returned %lx\n", hr); + ok(count == -1, "count = %ld\n", count); hr = AccessibleChildren(acc, 0, 0, NULL, &count); - ok(hr == E_INVALIDARG, "AccessibleChildren returned %x\n", hr); - ok(count == -1, "count = %d\n", count); + ok(hr == E_INVALIDARG, "AccessibleChildren returned %lx\n", hr); + ok(count == -1, "count = %ld\n", count); hr = AccessibleChildren(acc, 0, 0, children, NULL); - ok(hr == E_INVALIDARG, "AccessibleChildren returned %x\n", hr); + ok(hr == E_INVALIDARG, "AccessibleChildren returned %lx\n", hr);
if(acc == &Accessible) { SET_EXPECT(Accessible_QI_IEnumVARIANT); SET_EXPECT(Accessible_get_accChildCount); } hr = AccessibleChildren(acc, 0, 0, children, &count); - ok(hr == S_OK, "AccessibleChildren returned %x\n", hr); + ok(hr == S_OK, "AccessibleChildren returned %lx\n", hr); if(acc == &Accessible) { CHECK_CALLED(Accessible_QI_IEnumVARIANT); CHECK_CALLED(Accessible_get_accChildCount); } - ok(!count, "count = %d\n", count); + ok(!count, "count = %ld\n", count); count = -1; if(acc == &Accessible) { SET_EXPECT(Accessible_QI_IEnumVARIANT); SET_EXPECT(Accessible_get_accChildCount); } hr = AccessibleChildren(acc, 5, 0, children, &count); - ok(hr == S_OK, "AccessibleChildren returned %x\n", hr); + ok(hr == S_OK, "AccessibleChildren returned %lx\n", hr); if(acc == &Accessible) { CHECK_CALLED(Accessible_QI_IEnumVARIANT); CHECK_CALLED(Accessible_get_accChildCount); } - ok(!count, "count = %d\n", count); + ok(!count, "count = %ld\n", count);
memset(children, 0xfe, sizeof(children)); V_VT(children) = VT_DISPATCH; @@ -843,19 +843,19 @@ static void test_AccessibleChildren(IAccessible *acc) SET_EXPECT(Accessible_get_accChild); } hr = AccessibleChildren(acc, 0, 1, children, &count); - ok(hr == S_OK, "AccessibleChildren returned %x\n", hr); + ok(hr == S_OK, "AccessibleChildren returned %lx\n", hr); if(acc == &Accessible) { CHECK_CALLED(Accessible_QI_IEnumVARIANT); CHECK_CALLED(Accessible_get_accChildCount); CHECK_CALLED(Accessible_get_accChild);
ok(V_VT(children) == VT_I4, "V_VT(children) = %d\n", V_VT(children)); - ok(V_I4(children) == 1, "V_I4(children) = %d\n", V_I4(children)); + ok(V_I4(children) == 1, "V_I4(children) = %ld\n", V_I4(children)); }else { ok(V_VT(children) == VT_DISPATCH, "V_VT(children) = %d\n", V_VT(children)); IDispatch_Release(V_DISPATCH(children)); } - ok(count == 1, "count = %d\n", count); + ok(count == 1, "count = %ld\n", count);
if(acc == &Accessible) { SET_EXPECT(Accessible_QI_IEnumVARIANT); @@ -863,22 +863,22 @@ static void test_AccessibleChildren(IAccessible *acc) SET_EXPECT(Accessible_get_accChild); } hr = AccessibleChildren(acc, 0, 3, children, &count); - ok(hr == S_FALSE, "AccessibleChildren returned %x\n", hr); + ok(hr == S_FALSE, "AccessibleChildren returned %lx\n", hr); if(acc == &Accessible) { CHECK_CALLED(Accessible_QI_IEnumVARIANT); CHECK_CALLED(Accessible_get_accChildCount); CHECK_CALLED(Accessible_get_accChild);
ok(V_VT(children) == VT_I4, "V_VT(children) = %d\n", V_VT(children)); - ok(V_I4(children) == 1, "V_I4(children) = %d\n", V_I4(children)); + ok(V_I4(children) == 1, "V_I4(children) = %ld\n", V_I4(children));
- ok(count == 1, "count = %d\n", count); + ok(count == 1, "count = %ld\n", count); ok(V_VT(children+1) == VT_EMPTY, "V_VT(children+1) = %d\n", V_VT(children+1)); }else { ok(V_VT(children) == VT_DISPATCH, "V_VT(children) = %d\n", V_VT(children)); IDispatch_Release(V_DISPATCH(children));
- ok(count == 2, "count = %d\n", count); + ok(count == 2, "count = %ld\n", count); ok(V_VT(children+1) == VT_DISPATCH, "V_VT(children+1) = %d\n", V_VT(children+1)); IDispatch_Release(V_DISPATCH(children+1)); } @@ -894,9 +894,9 @@ static void _check_acc_state(unsigned line, IAccessible *acc, INT state) V_VT(&vid) = VT_I4; V_I4(&vid) = CHILDID_SELF; hr = IAccessible_get_accState(acc, vid, &v); - ok_(__FILE__, line)(hr == S_OK, "got %x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "got %lx\n", hr); ok_(__FILE__, line)(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok_(__FILE__, line)(V_I4(&v) == state, "V_I4(&v) = %x\n", V_I4(&v)); + ok_(__FILE__, line)(V_I4(&v) == state, "V_I4(&v) = %lx\n", V_I4(&v)); }
#define check_acc_hwnd(unk, hwnd) _check_acc_hwnd(__LINE__, unk, hwnd) @@ -907,9 +907,9 @@ static void _check_acc_hwnd(unsigned line, IUnknown *unk, HWND exp) HWND hwnd;
hr = IUnknown_QueryInterface(unk, &IID_IOleWindow, (void**)&ow); - ok_(__FILE__, line)(hr == S_OK, "got %x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "got %lx\n", hr); hr = IOleWindow_GetWindow(ow, &hwnd); - ok_(__FILE__, line)(hr == S_OK, "got %x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "got %lx\n", hr); ok_(__FILE__, line)(hwnd == exp, "hwnd = %p, expected %p\n", hwnd, exp); IOleWindow_Release(ow); } @@ -922,9 +922,9 @@ static DWORD WINAPI default_client_thread(LPVOID param) HWND hwnd;
hr = IAccessible_QueryInterface(acc, &IID_IOleWindow, (void**)&ow); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); hr = IOleWindow_GetWindow(ow, &hwnd); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); IOleWindow_Release(ow);
ShowWindow(hwnd, SW_SHOW); @@ -961,22 +961,22 @@ static void test_default_client_accessible_object(void) ok(chld2 != NULL, "CreateWindow failed\n");
hr = CreateStdAccessibleObject(NULL, OBJID_CLIENT, &IID_IAccessible, (void**)&acc); - ok(hr == E_FAIL, "got %x\n", hr); + ok(hr == E_FAIL, "got %lx\n", hr);
/* Test the static message */ hr = CreateStdAccessibleObject(chld, OBJID_CLIENT, &IID_IAccessible, (void**)&acc); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
V_VT(&vid) = VT_I4; V_I4(&vid) = CHILDID_SELF; hr = IAccessible_get_accName(acc, vid, &str); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(!lstrcmpW(str, L"static t &junk"), "name = %s\n", wine_dbgstr_w(str)); SysFreeString(str);
hr = IAccessible_get_accKeyboardShortcut(acc, vid, &str); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(!lstrcmpW(str, L"Alt+t"), "str = %s\n", wine_dbgstr_w(str)); SysFreeString(str);
@@ -985,17 +985,17 @@ static void test_default_client_accessible_object(void)
/* Test the button */ hr = CreateStdAccessibleObject(btn, OBJID_CLIENT, &IID_IAccessible, (void**)&acc); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
V_VT(&vid) = VT_I4; V_I4(&vid) = CHILDID_SELF; hr = IAccessible_get_accName(acc, vid, &str); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(!lstrcmpW(str, L"btn t &junk"), "name = %s\n", wine_dbgstr_w(str)); SysFreeString(str);
hr = IAccessible_get_accKeyboardShortcut(acc, vid, &str); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(!lstrcmpW(str, L"Alt+t"), "str = %s\n", wine_dbgstr_w(str)); SysFreeString(str);
@@ -1004,33 +1004,33 @@ static void test_default_client_accessible_object(void)
/* Now we can test and destroy the top-level window */ hr = CreateStdAccessibleObject(hwnd, OBJID_CLIENT, &IID_IAccessible, (void**)&acc); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
check_acc_hwnd((IUnknown*)acc, hwnd); hr = WindowFromAccessibleObject(acc, &hwnd2); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(hwnd == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, hwnd);
hr = IAccessible_get_accChildCount(acc, &l); - ok(hr == S_OK, "got %x\n", hr); - ok(l == 2, "l = %d\n", l); + ok(hr == S_OK, "got %lx\n", hr); + ok(l == 2, "l = %ld\n", l);
V_VT(&vid) = VT_I4; V_I4(&vid) = CHILDID_SELF; disp = (void*)0xdeadbeef; hr = IAccessible_get_accChild(acc, vid, &disp); - ok(hr == E_INVALIDARG, "get_accChild returned %x\n", hr); + ok(hr == E_INVALIDARG, "get_accChild returned %lx\n", hr); ok(disp == NULL, "disp = %p\n", disp);
V_I4(&vid) = 1; disp = (void*)0xdeadbeef; hr = IAccessible_get_accChild(acc, vid, &disp); - ok(hr == E_INVALIDARG, "get_accChild returned %x\n", hr); + ok(hr == E_INVALIDARG, "get_accChild returned %lx\n", hr); ok(disp == NULL, "disp = %p\n", disp);
/* Neither the parent nor any child windows have focus, VT_EMPTY. */ hr = IAccessible_get_accFocus(acc, &v); - ok(hr == S_OK, "hr %#x\n", hr); + ok(hr == S_OK, "hr %#lx\n", hr); ok(V_VT(&v) == VT_EMPTY, "V_VT(&v) = %d\n", V_VT(&v));
/* Set the focus to the parent window. */ @@ -1038,91 +1038,91 @@ static void test_default_client_accessible_object(void) SetFocus(hwnd); hr = IAccessible_get_accFocus(acc, &v); ok(GetFocus() == hwnd, "test window has no focus\n"); - ok(hr == S_OK, "hr %#x\n", hr); + ok(hr == S_OK, "hr %#lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == CHILDID_SELF, "V_I4(&v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == CHILDID_SELF, "V_I4(&v) = %ld\n", V_I4(&v));
/* Set focus to each child window. */ SetFocus(btn); hr = IAccessible_get_accFocus(acc, &v); ok(GetFocus() == btn, "test window has no focus\n"); - ok(hr == S_OK, "hr %#x\n", hr); + ok(hr == S_OK, "hr %#lx\n", hr); ok(V_VT(&v) == VT_DISPATCH, "V_VT(&v) = %d\n", V_VT(&v)); ok(V_DISPATCH(&v) != NULL, "V_DISPATCH(&v) = %p\n", V_DISPATCH(&v)); check_acc_hwnd((IUnknown*)V_DISPATCH(&v), btn);
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IAccessible, (void**)&win); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); IDispatch_Release(V_DISPATCH(&v));
V_VT(&vid) = VT_I4; V_I4(&vid) = CHILDID_SELF; hr = IAccessible_get_accRole(win, vid, &v); - todo_wine ok(hr == S_OK, "got %x\n", hr); + todo_wine ok(hr == S_OK, "got %lx\n", hr); todo_wine ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - todo_wine ok(V_I4(&v) == ROLE_SYSTEM_WINDOW, "V_I4(&v) = %d\n", V_I4(&v)); + todo_wine ok(V_I4(&v) == ROLE_SYSTEM_WINDOW, "V_I4(&v) = %ld\n", V_I4(&v)); IAccessible_Release(win);
SetFocus(chld); hr = IAccessible_get_accFocus(acc, &v); - ok(hr == S_OK, "hr %#x\n", hr); + ok(hr == S_OK, "hr %#lx\n", hr); ok(V_VT(&v) == VT_DISPATCH, "V_VT(&v) = %d\n", V_VT(&v)); ok(V_DISPATCH(&v) != NULL, "V_DISPATCH(&v) = %p\n", V_DISPATCH(&v)); check_acc_hwnd((IUnknown*)V_DISPATCH(&v), chld);
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IAccessible, (void**)&win); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); IDispatch_Release(V_DISPATCH(&v));
hr = IAccessible_get_accRole(win, vid, &v); - todo_wine ok(hr == S_OK, "got %x\n", hr); + todo_wine ok(hr == S_OK, "got %lx\n", hr); todo_wine ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - todo_wine ok(V_I4(&v) == ROLE_SYSTEM_WINDOW, "V_I4(&v) = %d\n", V_I4(&v)); + todo_wine ok(V_I4(&v) == ROLE_SYSTEM_WINDOW, "V_I4(&v) = %ld\n", V_I4(&v)); IAccessible_Release(win);
/* Child of a child, still works on parent HWND. */ SetFocus(chld2); hr = IAccessible_get_accFocus(acc, &v); - ok(hr == S_OK, "hr %#x\n", hr); + ok(hr == S_OK, "hr %#lx\n", hr); ok(V_VT(&v) == VT_DISPATCH, "V_VT(&v) = %d\n", V_VT(&v)); ok(V_DISPATCH(&v) != NULL, "V_DISPATCH(&v) = %p\n", V_DISPATCH(&v)); check_acc_hwnd((IUnknown*)V_DISPATCH(&v), chld2);
hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IAccessible, (void**)&win); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); IDispatch_Release(V_DISPATCH(&v));
hr = IAccessible_get_accRole(win, vid, &v); - todo_wine ok(hr == S_OK, "got %x\n", hr); + todo_wine ok(hr == S_OK, "got %lx\n", hr); todo_wine ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - todo_wine ok(V_I4(&v) == ROLE_SYSTEM_WINDOW, "V_I4(&v) = %d\n", V_I4(&v)); + todo_wine ok(V_I4(&v) == ROLE_SYSTEM_WINDOW, "V_I4(&v) = %ld\n", V_I4(&v)); IAccessible_Release(win);
ShowWindow(hwnd, SW_HIDE);
hr = IAccessible_QueryInterface(acc, &IID_IEnumVARIANT, (void**)&ev); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
hr = IEnumVARIANT_Skip(ev, 100); - ok(hr == S_FALSE, "Skip returned %x\n", hr); + ok(hr == S_FALSE, "Skip returned %lx\n", hr);
V_VT(&v) = VT_I4; fetched = 1; hr = IEnumVARIANT_Next(ev, 1, &v, &fetched); - ok(hr == S_FALSE, "got %x\n", hr); + ok(hr == S_FALSE, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(fetched == 0, "fetched = %d\n", fetched); + ok(fetched == 0, "fetched = %ld\n", fetched);
hr = IEnumVARIANT_Reset(ev); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr);
V_VT(&v) = VT_I4; fetched = 2; hr = IEnumVARIANT_Next(ev, 1, &v, &fetched); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_DISPATCH, "V_VT(&v) = %d\n", V_VT(&v)); IDispatch_Release(V_DISPATCH(&v)); - ok(fetched == 1, "fetched = %d\n", fetched); + ok(fetched == 1, "fetched = %ld\n", fetched); IEnumVARIANT_Release(ev);
test_AccessibleChildren(acc); @@ -1130,7 +1130,7 @@ static void test_default_client_accessible_object(void) V_VT(&vid) = VT_I4; V_I4(&vid) = CHILDID_SELF; hr = IAccessible_get_accName(acc, vid, &str); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); /* Window names don't have keyboard shortcuts */ todo_wine ok(!lstrcmpW(str, L"wnd &t &junk") || broken(!lstrcmpW(str, L"wnd t &junk")), /* Windows < 10 1607 */ @@ -1138,33 +1138,33 @@ static void test_default_client_accessible_object(void) SysFreeString(str);
hr = IAccessible_get_accKeyboardShortcut(acc, vid, &str); - todo_wine ok(hr == S_FALSE || broken(hr == S_OK), "got %x\n", hr); + todo_wine ok(hr == S_FALSE || broken(hr == S_OK), "got %lx\n", hr); todo_wine ok(str == NULL || broken(!lstrcmpW(str, L"Alt+t")), "str = %s\n", wine_dbgstr_w(str)); SysFreeString(str);
V_I4(&vid) = 1; str = (void*)0xdeadbeef; hr = IAccessible_get_accName(acc, vid, &str); - ok(hr == E_INVALIDARG, "got %x\n", hr); + ok(hr == E_INVALIDARG, "got %lx\n", hr); ok(!str, "str != NULL\n"); V_I4(&vid) = CHILDID_SELF;
str = (void*)0xdeadbeef; hr = IAccessible_get_accValue(acc, vid, &str); - ok(hr == S_FALSE, "got %x\n", hr); + ok(hr == S_FALSE, "got %lx\n", hr); ok(!str, "str != NULL\n");
str = (void*)0xdeadbeef; hr = IAccessible_get_accDescription(acc, vid, &str); - ok(hr == S_FALSE, "got %x\n", hr); + ok(hr == S_FALSE, "got %lx\n", hr); ok(!str, "str != NULL\n");
V_VT(&v) = VT_DISPATCH; V_DISPATCH(&v) = (void*)0xdeadbeef; hr = IAccessible_get_accRole(acc, vid, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == ROLE_SYSTEM_CLIENT, "V_I4(&v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == ROLE_SYSTEM_CLIENT, "V_I4(&v) = %ld\n", V_I4(&v));
check_acc_state(acc, STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_INVISIBLE); SetFocus(hwnd); @@ -1181,40 +1181,40 @@ static void test_default_client_accessible_object(void)
str = (void*)0xdeadbeef; hr = IAccessible_get_accHelp(acc, vid, &str); - ok(hr == S_FALSE, "got %x\n", hr); + ok(hr == S_FALSE, "got %lx\n", hr); ok(!str, "str != NULL\n");
str = (void*)0xdeadbeef; hr = IAccessible_get_accDefaultAction(acc, vid, &str); - ok(hr == S_FALSE, "got %x\n", hr); + ok(hr == S_FALSE, "got %lx\n", hr); ok(!str, "str != NULL\n");
pt.x = pt.y = 60; ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n"); hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == 0, "V_I4(&v) = %ld\n", V_I4(&v));
pt.x = pt.y = 25; ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n"); hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == 0, "V_I4(&v) = %ld\n", V_I4(&v));
ShowWindow(hwnd, SW_SHOW); pt.x = pt.y = 60; ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n"); hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == 0, "V_I4(&v) = %ld\n", V_I4(&v));
pt.x = pt.y = 25; ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n"); hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_DISPATCH, "V_VT(&v) = %d\n", V_VT(&v)); ok(V_DISPATCH(&v) != NULL, "V_DISPATCH(&v) = %p\n", V_DISPATCH(&v)); VariantClear(&v); @@ -1223,12 +1223,12 @@ static void test_default_client_accessible_object(void) pt.x = pt.y = 25; ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n"); hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == 0, "V_I4(&v) = %ld\n", V_I4(&v));
hr = IAccessible_get_accParent(acc, &disp); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(disp != NULL, "disp == NULL\n"); IDispatch_Release(disp);
@@ -1242,11 +1242,11 @@ static void test_default_client_accessible_object(void) pt.y = rect.bottom; MapWindowPoints(hwnd, NULL, &pt, 1); hr = IAccessible_accLocation(acc, &left, &top, &width, &height, vid); - ok(hr == S_OK, "got %x\n", hr); - ok(left == rect.left, "left = %d, expected %d\n", left, rect.left); - ok(top == rect.top, "top = %d, expected %d\n", top, rect.top); - ok(width == pt.x-rect.left, "width = %d, expected %d\n", width, pt.x-rect.left); - ok(height == pt.y-rect.top, "height = %d, expected %d\n", height, pt.y-rect.top); + ok(hr == S_OK, "got %lx\n", hr); + ok(left == rect.left, "left = %ld, expected %ld\n", left, rect.left); + ok(top == rect.top, "top = %ld, expected %ld\n", top, rect.top); + ok(width == pt.x-rect.left, "width = %ld, expected %ld\n", width, pt.x-rect.left); + ok(height == pt.y-rect.top, "height = %ld, expected %ld\n", height, pt.y-rect.top);
thread = CreateThread(NULL, 0, default_client_thread, (void *)acc, 0, NULL); while(MsgWaitForMultipleObjects(1, &thread, FALSE, INFINITE, QS_ALLINPUT) != WAIT_OBJECT_0) @@ -1263,45 +1263,45 @@ static void test_default_client_accessible_object(void) DestroyWindow(hwnd);
hr = IAccessible_get_accChildCount(acc, &l); - ok(hr == S_OK, "got %x\n", hr); - ok(l == 0, "l = %d\n", l); + ok(hr == S_OK, "got %lx\n", hr); + ok(l == 0, "l = %ld\n", l);
hr = IAccessible_get_accName(acc, vid, &str); - ok(hr == E_INVALIDARG, "got %x\n", hr); + ok(hr == E_INVALIDARG, "got %lx\n", hr);
hr = IAccessible_get_accValue(acc, vid, &str); - ok(hr == S_FALSE, "got %x\n", hr); + ok(hr == S_FALSE, "got %lx\n", hr);
hr = IAccessible_get_accRole(acc, vid, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == ROLE_SYSTEM_CLIENT, "V_I4(&v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == ROLE_SYSTEM_CLIENT, "V_I4(&v) = %ld\n", V_I4(&v));
hr = IAccessible_get_accState(acc, vid, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == STATE_SYSTEM_INVISIBLE, "V_I4(&v) = %x\n", V_I4(&v)); + ok(V_I4(&v) == STATE_SYSTEM_INVISIBLE, "V_I4(&v) = %lx\n", V_I4(&v));
hr = IAccessible_get_accFocus(acc, &v); - ok(hr == S_OK, "hr %#x\n", hr); + ok(hr == S_OK, "hr %#lx\n", hr); ok(V_VT(&v) == VT_EMPTY, "V_VT(&v) = %d\n", V_VT(&v));
hr = IAccessible_accHitTest(acc, 200, 200, &v); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v)); + ok(V_I4(&v) == 0, "V_I4(&v) = %ld\n", V_I4(&v));
disp = (void*)0xdeadbeef; hr = IAccessible_get_accParent(acc, &disp); - ok(hr == E_FAIL, "got %x\n", hr); + ok(hr == E_FAIL, "got %lx\n", hr); ok(disp == NULL, "disp = %p\n", disp);
hr = IAccessible_accLocation(acc, &left, &top, &width, &height, vid); - ok(hr == S_OK, "got %x\n", hr); - ok(left == 0, "left = %d\n", left); - ok(top == 0, "top = %d\n", top); - ok(width == 0, "width = %d\n", width); - ok(height == 0, "height = %d\n", height); + ok(hr == S_OK, "got %lx\n", hr); + ok(left == 0, "left = %ld\n", left); + ok(top == 0, "top = %ld\n", top); + ok(width == 0, "width = %ld\n", width); + ok(height == 0, "height = %ld\n", height);
IAccessible_Release(acc); } @@ -1331,26 +1331,26 @@ static void test_AccessibleObjectFromPoint(void) }
hr = AccessibleObjectFromPoint(point, NULL, NULL); - ok(hr == E_INVALIDARG, "got %x\n", hr); + ok(hr == E_INVALIDARG, "got %lx\n", hr);
hr = AccessibleObjectFromPoint(point, &acc, NULL); - ok(hr == E_INVALIDARG, "got %x\n", hr); + ok(hr == E_INVALIDARG, "got %lx\n", hr);
V_VT(&cid) = VT_DISPATCH; V_DISPATCH(&cid) = (IDispatch*)0xdeadbeef; hr = AccessibleObjectFromPoint(point, NULL, &cid); - ok(hr == E_INVALIDARG, "got %x\n", hr); + ok(hr == E_INVALIDARG, "got %lx\n", hr); ok(V_VT(&cid) == VT_DISPATCH, "got %#x, expected %#x\n", V_VT(&cid), VT_DISPATCH);
hr = AccessibleObjectFromPoint(point, &acc, &cid); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&cid) == VT_I4, "got %#x, expected %#x\n", V_VT(&cid), VT_I4); - ok(V_I4(&cid) == CHILDID_SELF, "got %#x, expected %#x\n", V_I4(&cid), CHILDID_SELF); + ok(V_I4(&cid) == CHILDID_SELF, "got %#lx, expected %#x\n", V_I4(&cid), CHILDID_SELF); check_acc_hwnd((IUnknown*)acc, hwnd); hr = IAccessible_get_accRole(acc, cid, &var); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&var) == VT_I4, "got %#x, expected %#x\n", V_VT(&var), VT_I4); - ok(V_I4(&var) == ROLE_SYSTEM_CLIENT, "got %#x, expected %#x\n", + ok(V_I4(&var) == ROLE_SYSTEM_CLIENT, "got %#lx, expected %#x\n", V_I4(&var), ROLE_SYSTEM_CLIENT); IAccessible_Release(acc);
@@ -1366,14 +1366,14 @@ static void test_AccessibleObjectFromPoint(void) }
hr = AccessibleObjectFromPoint(point, &acc, &cid); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&cid) == VT_I4, "got %#x, expected %#x\n", V_VT(&cid), VT_I4); - ok(V_I4(&cid) == CHILDID_SELF, "got %#x, expected %#x\n", V_I4(&cid), CHILDID_SELF); + ok(V_I4(&cid) == CHILDID_SELF, "got %#lx, expected %#x\n", V_I4(&cid), CHILDID_SELF); check_acc_hwnd((IUnknown*)acc, child); hr = IAccessible_get_accRole(acc, cid, &var); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); ok(V_VT(&var) == VT_I4, "got %#x, expected %#x\n", V_VT(&var), VT_I4); - ok(V_I4(&var) == ROLE_SYSTEM_TEXT, "got %#x, expected %#x\n", + ok(V_I4(&var) == ROLE_SYSTEM_TEXT, "got %#lx, expected %#x\n", V_I4(&var), ROLE_SYSTEM_TEXT); IAccessible_Release(acc);
@@ -1387,7 +1387,7 @@ static void test_CAccPropServices(void)
hres = CoCreateInstance(&CLSID_CAccPropServices, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IAccPropServices, (void**)&acc_prop_services); - ok(hres == S_OK, "Could not create CAccPropServices instance: %08x\n", hres); + ok(hres == S_OK, "Could not create CAccPropServices instance: %08lx\n", hres);
IAccPropServices_Release(acc_prop_services); } @@ -1398,8 +1398,8 @@ static LRESULT WINAPI test_query_class(HWND hwnd, UINT msg, WPARAM wparam, LPARA return 0;
CHECK_EXPECT(winproc_GETOBJECT); - ok(!wparam, "wparam = %lx\n", wparam); - ok(lparam == OBJID_QUERYCLASSNAMEIDX, "lparam = %lx\n", lparam); + ok(!wparam, "wparam = %Ix\n", wparam); + ok(lparam == OBJID_QUERYCLASSNAMEIDX, "lparam = %Ix\n", lparam); return 0; }
@@ -1454,7 +1454,7 @@ static void test_CreateStdAccessibleObject_classes(void) if (tests[i].client) SET_EXPECT(winproc_GETOBJECT); hr = CreateStdAccessibleObject(hwnd, OBJID_CLIENT, &IID_IAccessible, (void**)&acc); - ok(hr == S_OK, "CreateStdAccessibleObject failed %x\n", hr); + ok(hr == S_OK, "CreateStdAccessibleObject failed %lx\n", hr); if (tests[i].client) CHECK_CALLED(winproc_GETOBJECT); IAccessible_Release(acc); @@ -1462,7 +1462,7 @@ static void test_CreateStdAccessibleObject_classes(void) if (tests[i].window) SET_EXPECT(winproc_GETOBJECT); hr = CreateStdAccessibleObject(hwnd, OBJID_WINDOW, &IID_IAccessible, (void**)&acc); - ok(hr == S_OK, "CreateStdAccessibleObject failed %x\n", hr); + ok(hr == S_OK, "CreateStdAccessibleObject failed %lx\n", hr); if (tests[i].window) CHECK_CALLED(winproc_GETOBJECT); IAccessible_Release(acc); @@ -1511,42 +1511,42 @@ static void check_acc_vals_(IAccessible *acc, const acc_expected_vals *vals, V_VT(&vid) = VT_I4; V_I4(&vid) = CHILDID_SELF; hr = IAccessible_get_accName(acc, vid, &str); - ok_(__FILE__, line) (hr == (vals->name ? S_OK : S_FALSE), "get_accName returned %#x, expected %#x\n", + ok_(__FILE__, line) (hr == (vals->name ? S_OK : S_FALSE), "get_accName returned %#lx, expected %#lx\n", hr, (vals->name ? S_OK : S_FALSE)); ok_(__FILE__, line) (!lstrcmpW(str, vals->name), "get_accName returned %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(vals->name)); SysFreeString(str);
hr = IAccessible_get_accValue(acc, vid, &str); - ok_(__FILE__, line) (hr == vals->value_hr, "get_accValue returned %#x, expected %#x\n", + ok_(__FILE__, line) (hr == vals->value_hr, "get_accValue returned %#lx, expected %#lx\n", hr, vals->value_hr); ok_(__FILE__, line) (!lstrcmpW(str, vals->value), "get_accValue returned %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(vals->value)); SysFreeString(str);
hr = IAccessible_get_accDescription(acc, vid, &str); - ok_(__FILE__, line) (hr == (vals->description ? S_OK : S_FALSE), "get_accDescription returned %#x, expected %#x\n", + ok_(__FILE__, line) (hr == (vals->description ? S_OK : S_FALSE), "get_accDescription returned %#lx, expected %#lx\n", hr, vals->help ? S_OK : S_FALSE); ok_(__FILE__, line) (!lstrcmpW(str, vals->description), "get_accDescription returned %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(vals->description)); SysFreeString(str);
hr = IAccessible_get_accHelp(acc, vid, &str); - ok_(__FILE__, line) (hr == (vals->help ? S_OK : S_FALSE), "get_accHelp returned %#x, expected %#x\n", + ok_(__FILE__, line) (hr == (vals->help ? S_OK : S_FALSE), "get_accHelp returned %#lx, expected %#lx\n", hr, vals->help ? S_OK : S_FALSE); ok_(__FILE__, line) (!lstrcmpW(str, vals->help), "get_accHelp returned %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(vals->help)); SysFreeString(str);
hr = IAccessible_get_accKeyboardShortcut(acc, vid, &str); - ok_(__FILE__, line) (hr == (vals->kbd_shortcut ? S_OK : S_FALSE), "get_accKeyboardShortcut returned %#x, expected %#x\n", + ok_(__FILE__, line) (hr == (vals->kbd_shortcut ? S_OK : S_FALSE), "get_accKeyboardShortcut returned %#lx, expected %#lx\n", hr, vals->help ? S_OK : S_FALSE); ok_(__FILE__, line) (!lstrcmpW(str, vals->kbd_shortcut), "get_accKeyboardShortcut returned %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(vals->kbd_shortcut)); SysFreeString(str);
hr = IAccessible_get_accDefaultAction(acc, vid, &str); - ok_(__FILE__, line) (hr == (vals->default_action ? S_OK : S_FALSE), "get_accDefaultAction returned %#x, expected %#x\n", + ok_(__FILE__, line) (hr == (vals->default_action ? S_OK : S_FALSE), "get_accDefaultAction returned %#lx, expected %#lx\n", hr, vals->help ? S_OK : S_FALSE); ok_(__FILE__, line) (!lstrcmpW(str, vals->default_action), "get_accDefaultAction returned %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(vals->default_action)); @@ -1555,21 +1555,21 @@ static void check_acc_vals_(IAccessible *acc, const acc_expected_vals *vals, V_VT(&var) = VT_DISPATCH; V_DISPATCH(&var) = (void*)0xdeadbeef; hr = IAccessible_get_accRole(acc, vid, &var); - ok_(__FILE__, line) (hr == S_OK, "get_accRole returned %#x\n", hr); + ok_(__FILE__, line) (hr == S_OK, "get_accRole returned %#lx\n", hr); ok_(__FILE__, line) (V_VT(&var) == VT_I4, "V_VT(&var) returned %d, expected %d\n", V_VT(&var), VT_I4); - ok_(__FILE__, line) (V_I4(&var) == vals->role, "get_accRole returned %d, expected %d\n", + ok_(__FILE__, line) (V_I4(&var) == vals->role, "get_accRole returned %ld, expected %d\n", V_I4(&var), vals->role);
V_VT(&var) = VT_DISPATCH; V_DISPATCH(&var) = (void*)0xdeadbeef; hr = IAccessible_get_accState(acc, vid, &var); - ok_(__FILE__, line) (hr == S_OK, "get_accState returned %#x\n", hr); + ok_(__FILE__, line) (hr == S_OK, "get_accState returned %#lx\n", hr); ok_(__FILE__, line) (V_VT(&var) == VT_I4, "V_VT(&var) returned %d, expected %d\n", V_VT(&var), VT_I4); - ok_(__FILE__, line) (V_I4(&var) == vals->state, "get_accState returned %#x, expected %#x\n", + ok_(__FILE__, line) (V_I4(&var) == vals->state, "get_accState returned %#lx, expected %#x\n", V_I4(&var), vals->state);
hr = WindowFromAccessibleObject(acc, &hwnd); - ok_(__FILE__, line) (hr == S_OK, "got %x\n", hr); + ok_(__FILE__, line) (hr == S_OK, "got %lx\n", hr); ok_(__FILE__, line) (GetClientRect(hwnd, &rect), "GetClientRect failed\n"); pt.x = rect.left; pt.y = rect.top; @@ -1580,23 +1580,23 @@ static void check_acc_vals_(IAccessible *acc, const acc_expected_vals *vals, pt.y = rect.bottom; MapWindowPoints(hwnd, NULL, &pt, 1); hr = IAccessible_accLocation(acc, &left, &top, &width, &height, vid); - ok_(__FILE__, line) (hr == S_OK, "got %x\n", hr); - ok_(__FILE__, line) (left == rect.left, "left = %d, expected %d\n", left, rect.left); - ok_(__FILE__, line) (top == rect.top, "top = %d, expected %d\n", top, rect.top); - ok_(__FILE__, line) (width == pt.x-rect.left, "width = %d, expected %d\n", width, pt.x-rect.left); - ok_(__FILE__, line) (height == pt.y-rect.top, "height = %d, expected %d\n", height, pt.y-rect.top); + ok_(__FILE__, line) (hr == S_OK, "got %lx\n", hr); + ok_(__FILE__, line) (left == rect.left, "left = %ld, expected %ld\n", left, rect.left); + ok_(__FILE__, line) (top == rect.top, "top = %ld, expected %ld\n", top, rect.top); + ok_(__FILE__, line) (width == pt.x-rect.left, "width = %ld, expected %ld\n", width, pt.x-rect.left); + ok_(__FILE__, line) (height == pt.y-rect.top, "height = %ld, expected %ld\n", height, pt.y-rect.top);
child_count = -1; hr = IAccessible_get_accChildCount(acc, &child_count); - ok_(__FILE__, line) (hr == S_OK, "get_accChildCount returned %#x\n", hr); - ok_(__FILE__, line) (child_count == vals->child_count, "get_accChildCount returned %d, expected %#x\n", + ok_(__FILE__, line) (hr == S_OK, "get_accChildCount returned %#lx\n", hr); + ok_(__FILE__, line) (child_count == vals->child_count, "get_accChildCount returned %ld, expected %#lx\n", child_count, vals->child_count);
disp = (void *)0xdeadbeef; V_VT(&var) = VT_I4; V_I4(&var) = 1; hr = IAccessible_get_accChild(acc, var, &disp); - ok_(__FILE__, line) (hr == (vals->valid_child ? S_OK : E_INVALIDARG), "get_accChild returned %#x, expected %#x\n", + ok_(__FILE__, line) (hr == (vals->valid_child ? S_OK : E_INVALIDARG), "get_accChild returned %#lx, expected %#lx\n", hr, (vals->valid_child ? S_OK : E_INVALIDARG)); if (disp) { @@ -1608,19 +1608,19 @@ static void check_acc_vals_(IAccessible *acc, const acc_expected_vals *vals,
disp = (void *)0xdeadbeef; hr = IAccessible_get_accParent(acc, &disp); - ok_(__FILE__, line) (hr == S_OK, "get_accParent returned %#x\n", hr); + ok_(__FILE__, line) (hr == S_OK, "get_accParent returned %#lx\n", hr); ok_(__FILE__, line) (disp != NULL, "get_accParent returned a NULL pareent\n"); IDispatch_Release(disp);
V_VT(&var) = VT_EMPTY; hr = IAccessible_get_accFocus(acc, &var); - ok_(__FILE__, line) (hr == S_OK, "get_accFocus returned %#x\n", hr); + ok_(__FILE__, line) (hr == S_OK, "get_accFocus returned %#lx\n", hr); ok_(__FILE__, line) (V_VT(&var) == vals->focus_vt, "get_accFocus returned V_VT(&var) %d, expected %d\n", V_VT(&var), vals->focus_vt); switch(vals->focus_vt) { case VT_I4: - ok_(__FILE__, line) (V_I4(&var) == vals->focus_cid, "get_accFocus returned childID %d, expected %d\n", + ok_(__FILE__, line) (V_I4(&var) == vals->focus_cid, "get_accFocus returned childID %ld, expected %d\n", V_I4(&var), vals->focus_cid); break;
@@ -1744,21 +1744,21 @@ static void test_default_edit_accessible_object(void) ok(!!btn1, "Failed to create btn1 hwnd\n");
hr = CreateStdAccessibleObject(edit[0], OBJID_CLIENT, &IID_IAccessible, (void**)&acc); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); V_VT(&v) = VT_I4; V_I4(&v) = CHILDID_SELF; str = SysAllocString(L"edit0-test"); hr = IAccessible_put_accValue(acc, v, str); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); SysFreeString(str); check_acc_vals(acc, &edit_acc_vals[0]); IAccessible_Release(acc);
hr = CreateStdAccessibleObject(edit[1], OBJID_CLIENT, &IID_IAccessible, (void**)&acc); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); str = SysAllocString(L"password"); hr = IAccessible_put_accValue(acc, v, str); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); SysFreeString(str); check_acc_vals(acc, &edit_acc_vals[1]); IAccessible_Release(acc); @@ -1767,7 +1767,7 @@ static void test_default_edit_accessible_object(void) hr = CreateStdAccessibleObject(edit[2], OBJID_CLIENT, &IID_IAccessible, (void**)&acc); str = SysAllocString(L"edit2-test\r\ntest-edit2\n"); hr = IAccessible_put_accValue(acc, v, str); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); SysFreeString(str); check_acc_vals(acc, &edit_acc_vals[2]); IAccessible_Release(acc); @@ -1780,7 +1780,7 @@ static void test_default_edit_accessible_object(void) ShowWindow(label1, SW_HIDE); SetFocus(btn1); hr = CreateStdAccessibleObject(edit[3], OBJID_CLIENT, &IID_IAccessible, (void**)&acc); - ok(hr == S_OK, "got %x\n", hr); + ok(hr == S_OK, "got %lx\n", hr); check_acc_vals(acc, &edit_acc_vals[3]); IAccessible_Release(acc);
@@ -1805,7 +1805,7 @@ START_TEST(main)
lres = strtoll( argv[3], NULL, 16 ); hres = ObjectFromLresult(lres, &IID_IUnknown, 0, (void**)&unk); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); IUnknown_Release(unk);
CoUninitialize();
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oledb32/tests/Makefile.in | 1 dlls/oledb32/tests/convert.c | 2408 ++++++++++++++++++++-------------------- dlls/oledb32/tests/database.c | 248 ++-- dlls/oledb32/tests/marshal.c | 22 4 files changed, 1339 insertions(+), 1340 deletions(-)
diff --git a/dlls/oledb32/tests/Makefile.in b/dlls/oledb32/tests/Makefile.in index 7ac8f242fc2..1a4e07ead1e 100644 --- a/dlls/oledb32/tests/Makefile.in +++ b/dlls/oledb32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = oledb32.dll IMPORTS = uuid oleaut32 ole32 user32 gdi32 advapi32
diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index 7144150c2bc..85911808a16 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -53,93 +53,93 @@ static void test_dcinfo(void)
types[0] = DCINFOTYPE_VERSION; hr = IDCInfo_GetInfo(info, 1, types, &inf); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
- ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08x\n", inf->eInfoType); + ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08lx\n", inf->eInfoType); ok(V_VT(&inf->vData) == VT_UI4, "got %08x\n", V_VT(&inf->vData)); - ok(V_UI4(&inf->vData) == 0x110, "got %08x\n", V_UI4(&inf->vData)); + ok(V_UI4(&inf->vData) == 0x110, "got %08lx\n", V_UI4(&inf->vData));
V_UI4(&inf->vData) = 0x200; hr = IDCInfo_SetInfo(info, 1, inf); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); CoTaskMemFree(inf);
hr = IDCInfo_GetInfo(info, 1, types, &inf); - ok(hr == S_OK, "got %08x\n", hr); - ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08x\n", inf->eInfoType); + ok(hr == S_OK, "got %08lx\n", hr); + ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08lx\n", inf->eInfoType); ok(V_VT(&inf->vData) == VT_UI4, "got %08x\n", V_VT(&inf->vData)); - ok(V_UI4(&inf->vData) == 0x200, "got %08x\n", V_UI4(&inf->vData)); + ok(V_UI4(&inf->vData) == 0x200, "got %08lx\n", V_UI4(&inf->vData));
V_UI4(&inf->vData) = 0x100; hr = IDCInfo_SetInfo(info, 1, inf); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); CoTaskMemFree(inf);
hr = IDCInfo_GetInfo(info, 1, types, &inf); - ok(hr == S_OK, "got %08x\n", hr); - ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08x\n", inf->eInfoType); + ok(hr == S_OK, "got %08lx\n", hr); + ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08lx\n", inf->eInfoType); ok(V_VT(&inf->vData) == VT_UI4, "got %08x\n", V_VT(&inf->vData)); - ok(V_UI4(&inf->vData) == 0x100, "got %08x\n", V_UI4(&inf->vData)); + ok(V_UI4(&inf->vData) == 0x100, "got %08lx\n", V_UI4(&inf->vData));
V_UI4(&inf->vData) = 0x500; hr = IDCInfo_SetInfo(info, 1, inf); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); CoTaskMemFree(inf);
hr = IDCInfo_GetInfo(info, 1, types, &inf); - ok(hr == S_OK, "got %08x\n", hr); - ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08x\n", inf->eInfoType); + ok(hr == S_OK, "got %08lx\n", hr); + ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08lx\n", inf->eInfoType); ok(V_VT(&inf->vData) == VT_UI4, "got %08x\n", V_VT(&inf->vData)); - ok(V_UI4(&inf->vData) == 0x500, "got %08x\n", V_UI4(&inf->vData)); + ok(V_UI4(&inf->vData) == 0x500, "got %08lx\n", V_UI4(&inf->vData));
V_UI4(&inf->vData) = 0xffff; hr = IDCInfo_SetInfo(info, 1, inf); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); CoTaskMemFree(inf);
hr = IDCInfo_GetInfo(info, 1, types, &inf); - ok(hr == S_OK, "got %08x\n", hr); - ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08x\n", inf->eInfoType); + ok(hr == S_OK, "got %08lx\n", hr); + ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08lx\n", inf->eInfoType); ok(V_VT(&inf->vData) == VT_UI4, "got %08x\n", V_VT(&inf->vData)); - ok(V_UI4(&inf->vData) == 0xffff, "got %08x\n", V_UI4(&inf->vData)); + ok(V_UI4(&inf->vData) == 0xffff, "got %08lx\n", V_UI4(&inf->vData));
V_UI4(&inf->vData) = 0x12345678; hr = IDCInfo_SetInfo(info, 1, inf); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); CoTaskMemFree(inf);
hr = IDCInfo_GetInfo(info, 1, types, &inf); - ok(hr == S_OK, "got %08x\n", hr); - ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08x\n", inf->eInfoType); + ok(hr == S_OK, "got %08lx\n", hr); + ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08lx\n", inf->eInfoType); ok(V_VT(&inf->vData) == VT_UI4, "got %08x\n", V_VT(&inf->vData)); - ok(V_UI4(&inf->vData) == 0x12345678, "got %08x\n", V_UI4(&inf->vData)); + ok(V_UI4(&inf->vData) == 0x12345678, "got %08lx\n", V_UI4(&inf->vData));
/* Try setting a version variant of something other than VT_UI4 */ V_VT(&inf->vData) = VT_I4; V_I4(&inf->vData) = 0x200; hr = IDCInfo_SetInfo(info, 1, inf); - ok(hr == DB_S_ERRORSOCCURRED, "got %08x\n", hr); + ok(hr == DB_S_ERRORSOCCURRED, "got %08lx\n", hr); CoTaskMemFree(inf);
hr = IDCInfo_GetInfo(info, 1, types, &inf); - ok(hr == S_OK, "got %08x\n", hr); - ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08x\n", inf->eInfoType); + ok(hr == S_OK, "got %08lx\n", hr); + ok(inf->eInfoType == DCINFOTYPE_VERSION, "got %08lx\n", inf->eInfoType); ok(V_VT(&inf->vData) == VT_UI4, "got %08x\n", V_VT(&inf->vData)); - ok(V_UI4(&inf->vData) == 0x12345678, "got %08x\n", V_UI4(&inf->vData)); + ok(V_UI4(&inf->vData) == 0x12345678, "got %08lx\n", V_UI4(&inf->vData)); CoTaskMemFree(inf);
/* More than one type */ types[1] = 2; hr = IDCInfo_GetInfo(info, 2, types, &inf); - ok(hr == S_OK, "got %08x\n", hr); - ok(inf[0].eInfoType == DCINFOTYPE_VERSION, "got %08x\n", inf[0].eInfoType); + ok(hr == S_OK, "got %08lx\n", hr); + ok(inf[0].eInfoType == DCINFOTYPE_VERSION, "got %08lx\n", inf[0].eInfoType); ok(V_VT(&inf[0].vData) == VT_UI4, "got %08x\n", V_VT(&inf[0].vData)); - ok(V_UI4(&inf[0].vData) == 0x12345678, "got %08x\n", V_UI4(&inf[0].vData)); - ok(inf[1].eInfoType == 2, "got %08x\n", inf[1].eInfoType); + ok(V_UI4(&inf[0].vData) == 0x12345678, "got %08lx\n", V_UI4(&inf[0].vData)); + ok(inf[1].eInfoType == 2, "got %08lx\n", inf[1].eInfoType); ok(V_VT(&inf[1].vData) == VT_EMPTY, "got %08x\n", V_VT(&inf[1].vData));
hr = IDCInfo_SetInfo(info, 2, inf); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); CoTaskMemFree(inf);
@@ -231,7 +231,7 @@ static void test_canconvert(void) expect = simple_expect; ok((hr == S_OK && expect == TRUE) || (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type, + "%04x -> %04x: got %08lx expect conversion to be %spossible\n", simple_convert[src_idx].type, simple_convert[dst_idx].type, hr, expect ? "" : "not ");
/* src DBTYPE_BYREF */ @@ -239,7 +239,7 @@ static void test_canconvert(void) expect = simple_expect; ok((hr == S_OK && expect == TRUE) || (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_BYREF, + "%04x -> %04x: got %08lx expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_BYREF, simple_convert[dst_idx].type, hr, expect ? "" : "not ");
/* dst DBTYPE_BYREF */ @@ -252,7 +252,7 @@ static void test_canconvert(void) expect = TRUE; ok((hr == S_OK && expect == TRUE) || (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type, + "%04x -> %04x: got %08lx expect conversion to be %spossible\n", simple_convert[src_idx].type, simple_convert[dst_idx].type | DBTYPE_BYREF, hr, expect ? "" : "not ");
/* src & dst DBTYPE_BYREF */ @@ -265,7 +265,7 @@ static void test_canconvert(void) expect = TRUE; ok((hr == S_OK && expect == TRUE) || (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_BYREF, + "%04x -> %04x: got %08lx expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_BYREF, simple_convert[dst_idx].type | DBTYPE_BYREF, hr, expect ? "" : "not ");
/* src DBTYPE_ARRAY */ @@ -275,7 +275,7 @@ static void test_canconvert(void) expect = TRUE; ok((hr == S_OK && expect == TRUE) || (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_ARRAY, + "%04x -> %04x: got %08lx expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_ARRAY, simple_convert[dst_idx].type, hr, expect ? "" : "not ");
/* dst DBTYPE_ARRAY */ @@ -287,7 +287,7 @@ static void test_canconvert(void) expect = TRUE; ok((hr == S_OK && expect == TRUE) || (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type, + "%04x -> %04x: got %08lx expect conversion to be %spossible\n", simple_convert[src_idx].type, simple_convert[dst_idx].type | DBTYPE_ARRAY, hr, expect ? "" : "not ");
/* src & dst DBTYPE_ARRAY */ @@ -298,25 +298,25 @@ static void test_canconvert(void) expect = TRUE; ok((hr == S_OK && expect == TRUE) || (hr == S_FALSE && expect == FALSE), - "%04x -> %04x: got %08x expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_ARRAY, + "%04x -> %04x: got %08lx expect conversion to be %spossible\n", simple_convert[src_idx].type | DBTYPE_ARRAY, simple_convert[dst_idx].type | DBTYPE_ARRAY, hr, expect ? "" : "not ");
/* src DBTYPE_VECTOR */ hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type); ok(hr == S_FALSE, - "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type | DBTYPE_VECTOR, + "%04x -> %04x: got %08lx expect conversion to not be possible\n", simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type, hr);
/* dst DBTYPE_VECTOR */ hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type, simple_convert[dst_idx].type | DBTYPE_VECTOR); ok(hr == S_FALSE, - "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type, + "%04x -> %04x: got %08lx expect conversion to not be possible\n", simple_convert[src_idx].type, simple_convert[dst_idx].type | DBTYPE_VECTOR, hr);
/* src & dst DBTYPE_VECTOR */ hr = IDataConvert_CanConvert(convert, simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type | DBTYPE_VECTOR); ok(hr == S_FALSE, - "%04x -> %04x: got %08x expect conversion to not be possible\n", simple_convert[src_idx].type | DBTYPE_VECTOR, + "%04x -> %04x: got %08lx expect conversion to not be possible\n", simple_convert[src_idx].type | DBTYPE_VECTOR, simple_convert[dst_idx].type | DBTYPE_VECTOR, hr);
@@ -335,199 +335,199 @@ static void test_converttoi1(void)
dst_len = dst = 0x12; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0, "got %08x\n", dst);
dst_len = dst = 0x12; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x12, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x12, "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; *(short *)src = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst_len = dst = 0x12; *(int *)src = 0x4321cafe; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; *(int *)src = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst_len = dst = 0x12; *(FLOAT *)src = 10.75; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 11, "got %08x\n", dst);
dst_len = dst = 0x12; *(FLOAT *)src = -10.75; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == -11, "got %08x\n", dst);
dst_len = dst = 0x12; *(double *)src = 10.75; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 11, "got %08x\n", dst);
dst_len = dst = 0x12; ((LARGE_INTEGER *)src)->QuadPart = 107500; hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 11, "got %08x\n", dst);
dst_len = dst = 0x12; *(DATE *)src = 10.7500; hr = IDataConvert_DataConvert(convert, DBTYPE_DATE, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 11, "got %08x\n", dst);
dst_len = dst = 0x12; b = SysAllocString(ten); *(BSTR *)src = b; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst); SysFreeString(b);
dst_len = dst = 0x12; *(SCODE *)src = 0x4321cafe; hr = IDataConvert_DataConvert(convert, DBTYPE_ERROR, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x12, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x12, "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; *(VARIANT_BOOL *)src = VARIANT_TRUE; hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == -1, "got %08x\n", dst);
dst_len = dst = 0x12; *(VARIANT_BOOL *)src = VARIANT_FALSE; hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0, "got %08x\n", dst);
dst_len = dst = 0x12; V_VT((VARIANT*)src) = VT_I2; V_I2((VARIANT*)src) = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
V_VT((VARIANT*)src) = VT_NULL; dst_len = 0x12; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 0x12, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 0x12, "got %Id\n", dst_len);
dst_len = dst = 0x12; memset(src, 0, sizeof(DECIMAL)); ((DECIMAL*)src)->u1.Lo64 = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_DECIMAL, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst_len = dst = 0x12; *(signed char*)src = 0x70; hr = IDataConvert_DataConvert(convert, DBTYPE_I1, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x70, "got %08x\n", dst);
dst_len = dst = 0x12; *(BYTE*)src = 0x70; hr = IDataConvert_DataConvert(convert, DBTYPE_UI1, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x70, "got %08x\n", dst);
dst_len = dst = 0x12; *(WORD*)src = 0xC8; hr = IDataConvert_DataConvert(convert, DBTYPE_UI1, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); todo_wine - ok(broken(dst_len == sizeof(dst)) || dst_len == 0x12 /* W2K+ */, "got %ld\n", dst_len); + ok(broken(dst_len == sizeof(dst)) || dst_len == 0x12 /* W2K+ */, "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; *(WORD*)src = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_UI2, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst_len = dst = 0x12; *(DWORD*)src = 0xabcd1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; *(DWORD*)src = 0x12abcd; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; *(DWORD*)src = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst_len = dst = 0x12; @@ -535,102 +535,102 @@ static void test_converttoi1(void) hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); ok(hr == DB_E_ERRORSOCCURRED || broken(hr == DB_E_UNSUPPORTEDCONVERSION), /* win98 */ - "got %08x\n", hr); + "got %08lx\n", hr); if(hr != DB_E_UNSUPPORTEDCONVERSION) /* win98 doesn't support I8/UI8 */ { - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; ((LARGE_INTEGER*)src)->QuadPart = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst_len = dst = 0x12; ((ULARGE_INTEGER*)src)->QuadPart = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst); }
dst_len = dst = 0x12; strcpy((char *)src, "10"); hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I1, 2, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst);
dst_len = dst = 0x12; strcpy((char *)src, "10"); hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst);
dst_len = dst = 0x12; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I1, 4, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst);
dst_len = dst = 0x12; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst);
dst_len = dst = 0x12; *(WORD*)src = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_UI2, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst_len = dst = 0x12; *(DWORD*)src = 0xabcd1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; *(DWORD*)src = 0x12abcd; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst_len = dst = 0x12; *(DWORD*)src = 0x43; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst_len = dst = 0x12; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst); }
@@ -646,199 +646,199 @@ static void test_converttoi2(void)
dst_len = dst = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0, "got %08x\n", dst);
dst_len = dst = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; *(short *)src = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
dst_len = dst = 0x1234; *(int *)src = 0x4321cafe; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; *(int *)src = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
dst_len = dst = 0x1234; *(FLOAT *)src = 10.75; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 11, "got %08x\n", dst);
dst_len = dst = 0x1234; *(FLOAT *)src = -10.75; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == -11, "got %08x\n", dst);
dst_len = dst = 0x1234; *(double *)src = 10.75; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 11, "got %08x\n", dst);
dst_len = dst = 0x1234; ((LARGE_INTEGER *)src)->QuadPart = 107500; hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 11, "got %08x\n", dst);
dst_len = dst = 0x1234; *(DATE *)src = 10.7500; hr = IDataConvert_DataConvert(convert, DBTYPE_DATE, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 11, "got %08x\n", dst);
dst_len = dst = 0x1234; b = SysAllocString(ten); *(BSTR *)src = b; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst); SysFreeString(b);
dst_len = dst = 0x1234; *(SCODE *)src = 0x4321cafe; hr = IDataConvert_DataConvert(convert, DBTYPE_ERROR, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; *(VARIANT_BOOL *)src = VARIANT_TRUE; hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == -1, "got %08x\n", dst);
dst_len = dst = 0x1234; *(VARIANT_BOOL *)src = VARIANT_FALSE; hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0, "got %08x\n", dst);
dst_len = dst = 0x1234; V_VT((VARIANT*)src) = VT_I2; V_I2((VARIANT*)src) = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
V_VT((VARIANT*)src) = VT_NULL; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len);
dst_len = dst = 0x1234; memset(src, 0, sizeof(DECIMAL)); ((DECIMAL*)src)->u1.Lo64 = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_DECIMAL, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
dst_len = dst = 0x1234; *(signed char*)src = 0xab; hr = IDataConvert_DataConvert(convert, DBTYPE_I1, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == (signed short)0xffab, "got %08x\n", dst);
dst_len = dst = 0x1234; *(BYTE*)src = 0xab; hr = IDataConvert_DataConvert(convert, DBTYPE_UI1, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0xab, "got %08x\n", dst);
dst_len = dst = 0x1234; *(WORD*)src = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_UI2, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
dst_len = dst = 0x1234; *(WORD*)src = 0xabcd; hr = IDataConvert_DataConvert(convert, DBTYPE_UI2, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); todo_wine - ok(broken(dst_len == sizeof(dst)) || dst_len == 0x1234 /* W2K+ */, "got %ld\n", dst_len); + ok(broken(dst_len == sizeof(dst)) || dst_len == 0x1234 /* W2K+ */, "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; *(DWORD*)src = 0xabcd1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; *(DWORD*)src = 0x1234abcd; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; *(DWORD*)src = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
dst_len = dst = 0x1234; @@ -846,103 +846,103 @@ static void test_converttoi2(void) hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); ok(hr == DB_E_ERRORSOCCURRED || broken(hr == DB_E_UNSUPPORTEDCONVERSION), /* win98 */ - "got %08x\n", hr); + "got %08lx\n", hr); if(hr != DB_E_UNSUPPORTEDCONVERSION) /* win98 doesn't support I8/UI8 */ { - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; ((LARGE_INTEGER*)src)->QuadPart = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
dst_len = dst = 0x1234; ((ULARGE_INTEGER*)src)->QuadPart = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst); }
dst_len = dst = 0x1234; strcpy((char *)src, "10"); hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I2, 2, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst);
dst_len = dst = 0x1234; strcpy((char *)src, "10"); hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst);
dst_len = dst = 0x1234; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I2, 4, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst);
dst_len = dst = 0x1234; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst);
/* */ dst_len = dst = 0x1234; *(WORD*)src = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_UI2, DBTYPE_UI2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
dst_len = dst = 0x1234; *(DWORD*)src = 0xabcd1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_UI2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; *(DWORD*)src = 0x1234abcd; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_UI2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); todo_wine - ok(hr == DB_E_DATAOVERFLOW, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_DATAOVERFLOW, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x1234, "got %08x\n", dst);
dst_len = dst = 0x1234; *(DWORD*)src = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_UI2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %08x\n", dst);
dst_len = dst = 0x1234; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_UI2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10, "got %08x\n", dst); }
@@ -959,79 +959,79 @@ static void test_converttoi4(void) i4 = 0x12345678; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0, "got %08x\n", i4);
i4 = 0x12345678; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(i4 == 0x12345678, "got %08x\n", i4);
i4 = 0x12345678; *(short *)src = 0x4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0x4321, "got %08x\n", i4);
i4 = 0x12345678; *(int *)src = 0x4321cafe; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0x4321cafe, "got %08x\n", i4);
i4 = 0x12345678; *(FLOAT *)src = 10.75; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 11, "got %08x\n", i4);
i4 = 0x12345678; *(FLOAT *)src = -10.75; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == -11, "got %08x\n", i4);
i4 = 0x12345678; *(double *)src = 10.75; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 11, "got %08x\n", i4);
i4 = 0x12345678; ((LARGE_INTEGER *)src)->QuadPart = 107500; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 11, "got %08x\n", i4);
i4 = 0x12345678; *(DATE *)src = 10.7500; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_DATE, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 11, "got %08x\n", i4);
i4 = 0x12345678; @@ -1039,9 +1039,9 @@ static void test_converttoi4(void) *(BSTR *)src = b; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 10, "got %08x\n", i4); SysFreeString(b);
@@ -1049,27 +1049,27 @@ static void test_converttoi4(void) *(SCODE *)src = 0x4321cafe; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_ERROR, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(i4 == 0x12345678, "got %08x\n", i4);
i4 = 0x12345678; *(VARIANT_BOOL *)src = VARIANT_TRUE; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0xffffffff, "got %08x\n", i4);
i4 = 0x12345678; *(VARIANT_BOOL *)src = VARIANT_FALSE; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0, "got %08x\n", i4);
i4 = 0x12345678; @@ -1077,72 +1077,72 @@ static void test_converttoi4(void) V_I2((VARIANT*)src) = 0x1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0x1234, "got %08x\n", i4);
V_VT((VARIANT*)src) = VT_NULL; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len);
i4 = 0x12345678; memset(src, 0, sizeof(DECIMAL)); ((DECIMAL*)src)->u1.Lo64 = 0x1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_DECIMAL, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0x1234, "got %08x\n", i4);
i4 = 0x12345678; *(signed char*)src = 0xab; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I1, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0xffffffab, "got %08x\n", i4);
i4 = 0x12345678; *(BYTE*)src = 0xab; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI1, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0xab, "got %08x\n", i4);
i4 = 0x12345678; *(WORD*)src = 0xabcd; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI2, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0xabcd, "got %08x\n", i4);
i4 = 0x12345678; *(DWORD*)src = 0xabcd1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); todo_wine - ok(broken(dst_len == sizeof(i4)) || dst_len == 0x1234 /* W2K+ */, "got %ld\n", dst_len); + ok(broken(dst_len == sizeof(i4)) || dst_len == 0x1234 /* W2K+ */, "got %Id\n", dst_len); ok(i4 == 0x12345678, "got %08x\n", i4);
i4 = 0x12345678; *(DWORD*)src = 0x1234abcd; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0x1234abcd, "got %08x\n", i4);
i4 = 0x12345678; @@ -1151,20 +1151,20 @@ static void test_converttoi4(void) hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); ok(hr == S_OK || broken(hr == DB_E_UNSUPPORTEDCONVERSION), /* win98 */ - "got %08x\n", hr); + "got %08lx\n", hr); if(hr != DB_E_UNSUPPORTEDCONVERSION) /* win98 doesn't support I8/UI8 */ { - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0x1234abcd, "got %08x\n", i4);
i4 = 0x12345678; ((ULARGE_INTEGER*)src)->QuadPart = 0x1234abcd; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 0x1234abcd, "got %08x\n", i4); }
@@ -1172,51 +1172,51 @@ static void test_converttoi4(void) strcpy((char *)src, "10"); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I4, 2, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 10, "got %08x\n", i4);
i4 = 0x12345678; strcpy((char *)src, "10"); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 10, "got %08x\n", i4);
i4 = 0x12345678; memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I4, 4, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 10, "got %08x\n", i4);
i4 = 0x12345678; memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len); ok(i4 == 10, "got %08x\n", i4);
/* src_status = DBSTATUS_S_ISNULL */ i4 = 0x12345678; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), DBSTATUS_S_ISNULL, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len);
/* dst = NULL */ *(int *)src = 0x4321cafe; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I4, 0, &dst_len, src, NULL, 0, 0, NULL, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_len == sizeof(i4), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_len == sizeof(i4), "got %Id\n", dst_len);
}
@@ -1234,9 +1234,9 @@ static void test_converttoi8(void) ((ULARGE_INTEGER*)src)->QuadPart = 1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst.QuadPart == 1234, "got %d\n", (int)dst.QuadPart);
dst.QuadPart = 0xcc; @@ -1244,18 +1244,18 @@ static void test_converttoi8(void) b = SysAllocString(ten); *(BSTR *)src = b; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_I8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst.QuadPart == 10, "got %d\n", (int)dst.QuadPart); SysFreeString(b);
V_VT((VARIANT*)src) = VT_NULL; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_I8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); }
static void test_converttobstr(void) @@ -1275,25 +1275,25 @@ static void test_converttobstr(void)
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_BSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst != NULL, "got %p\n", dst); ok(SysStringLen(dst) == 0, "got %d\n", SysStringLen(dst)); SysFreeString(dst);
dst = (void*)0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_BSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == (void*)0x1234, "got %p\n", dst);
*(short *)src = 4321; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_BSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst != NULL, "got %p\n", dst); ok(SysStringLen(dst) == 4, "got %d\n", SysStringLen(dst)); SysFreeString(dst); @@ -1301,9 +1301,9 @@ static void test_converttobstr(void) b = SysAllocString(ten); *(BSTR *)src = b; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_BSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst != NULL, "got %p\n", dst); ok(dst != b, "got %p src %p\n", dst, b); ok(!lstrcmpW(b, dst), "got %s\n", wine_dbgstr_w(dst)); @@ -1314,9 +1314,9 @@ static void test_converttobstr(void) V_VT(&v) = VT_BSTR; V_BSTR(&v) = b; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_BSTR, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst != NULL, "got %p\n", dst); ok(dst != b, "got %p src %p\n", dst, b); ok(!lstrcmpW(b, dst), "got %s\n", wine_dbgstr_w(dst)); @@ -1327,34 +1327,34 @@ static void test_converttobstr(void) dst = (void*)0x1234; dst_len = 33; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_BSTR, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 33, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 33, "got %Id\n", dst_len); ok(dst == (void*)0x1234, "got %p\n", dst);
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_DBTIMESTAMP, DBTYPE_BSTR, 0, &dst_len, &ts, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(BSTR), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(BSTR), "got %Id\n", dst_len); ok(!lstrcmpW(tsW, dst), "got %s\n", wine_dbgstr_w(dst)); SysFreeString(dst);
dst_len = 0x1234; ts.fraction = 3; hr = IDataConvert_DataConvert(convert, DBTYPE_DBTIMESTAMP, DBTYPE_BSTR, 0, &dst_len, &ts, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(BSTR), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(BSTR), "got %Id\n", dst_len); ok(!lstrcmpW(ts1W, dst), "got %s\n", wine_dbgstr_w(dst)); SysFreeString(dst);
dst_len = 0x1234; ts.fraction = 200; hr = IDataConvert_DataConvert(convert, DBTYPE_DBTIMESTAMP, DBTYPE_BSTR, 0, &dst_len, &ts, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(BSTR), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(BSTR), "got %Id\n", dst_len); ok(!lstrcmpW(ts2W, dst), "got %s\n", wine_dbgstr_w(dst)); SysFreeString(dst); } @@ -1385,53 +1385,53 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == 0xcccc, "got %02x\n", dst[1]);
memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(short *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
*(short *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_WSTR, 0, &dst_len, src, dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(short *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_WSTR, 0, &dst_len, src, NULL, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(short *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_WSTR, 0, &dst_len, src, dst, 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); ok(dst[2] == 0xcccc, "got %02x\n", dst[2]); @@ -1440,9 +1440,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_WSTR, 0, &dst_len, src, dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == 0xcccc, "got %02x\n", dst[1]);
@@ -1450,9 +1450,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_WSTR, 0, &dst_len, src, dst, 8, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == '3', "got %02x\n", dst[1]); ok(dst[2] == '2', "got %02x\n", dst[2]); @@ -1464,35 +1464,35 @@ static void test_converttowstr(void) *(int *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
*(int *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_WSTR, 0, &dst_len, src, dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(int *)src = 4321; memset(dst, 0xcc, sizeof(dst)); hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_WSTR, 0, &dst_len, src, NULL, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(int *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_WSTR, 0, &dst_len, src, dst, 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); ok(dst[2] == 0xcccc, "got %02x\n", dst[2]); @@ -1501,9 +1501,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_WSTR, 0, &dst_len, src, dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == 0xcccc, "got %02x\n", dst[1]);
@@ -1511,9 +1511,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_WSTR, 0, &dst_len, src, dst, 8, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == '3', "got %02x\n", dst[1]); ok(dst[2] == '2', "got %02x\n", dst[2]); @@ -1525,35 +1525,35 @@ static void test_converttowstr(void) *(float *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
*(float *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_WSTR, 0, &dst_len, src, dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(float *)src = 4321; memset(dst, 0xcc, sizeof(dst)); hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_WSTR, 0, &dst_len, src, NULL, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(float *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_WSTR, 0, &dst_len, src, dst, 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); ok(dst[2] == 0xcccc, "got %02x\n", dst[2]); @@ -1562,9 +1562,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_WSTR, 0, &dst_len, src, dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == 0xcccc, "got %02x\n", dst[1]);
@@ -1572,9 +1572,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_WSTR, 0, &dst_len, src, dst, 8, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == '3', "got %02x\n", dst[1]); ok(dst[2] == '2', "got %02x\n", dst[2]); @@ -1586,35 +1586,35 @@ static void test_converttowstr(void) *(double *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
*(double *)src = 4321; memset(dst, 0xcc, sizeof(dst)); hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_WSTR, 0, &dst_len, src, dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(double *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_WSTR, 0, &dst_len, src, NULL, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0xcccc, "got %02x\n", dst[0]);
*(double *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_WSTR, 0, &dst_len, src, dst, 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); ok(dst[2] == 0xcccc, "got %02x\n", dst[2]); @@ -1623,9 +1623,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_WSTR, 0, &dst_len, src, dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == 0xcccc, "got %02x\n", dst[1]);
@@ -1633,9 +1633,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_WSTR, 0, &dst_len, src, dst, 8, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == '3', "got %02x\n", dst[1]); ok(dst[2] == '2', "got %02x\n", dst[2]); @@ -1649,9 +1649,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
@@ -1660,53 +1660,53 @@ static void test_converttowstr(void) *(signed char *)src = 10; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I1, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpW(dst, ten), "got %s\n", wine_dbgstr_w(dst));
memset(src, 0, sizeof(src)); *(unsigned char *)src = 10; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI1, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpW(dst, ten), "got %s\n", wine_dbgstr_w(dst));
memset(src, 0, sizeof(src)); *(unsigned short *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI2, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
memset(src, 0, sizeof(src)); *(unsigned int *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
memset(src, 0, sizeof(src)); ((LARGE_INTEGER*)src)->QuadPart = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(broken(hr == DB_E_UNSUPPORTEDCONVERSION) || hr == S_OK /* W2K+ */, "got %08x\n", hr); - ok(broken(dst_status == DBSTATUS_E_BADACCESSOR) || dst_status == DBSTATUS_S_OK /* W2K+ */, "got %08x\n", dst_status); - ok(broken(dst_len == 0x1234) || dst_len == 8 /* W2K+ */, "got %ld\n", dst_len); + ok(broken(hr == DB_E_UNSUPPORTEDCONVERSION) || hr == S_OK /* W2K+ */, "got %08lx\n", hr); + ok(broken(dst_status == DBSTATUS_E_BADACCESSOR) || dst_status == DBSTATUS_S_OK /* W2K+ */, "got %08lx\n", dst_status); + ok(broken(dst_len == 0x1234) || dst_len == 8 /* W2K+ */, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
memset(src, 0, sizeof(src)); ((ULARGE_INTEGER*)src)->QuadPart = 4321; hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(broken(hr == DB_E_UNSUPPORTEDCONVERSION) || hr == S_OK /* W2K+ */, "got %08x\n", hr); - ok(broken(dst_status == DBSTATUS_E_BADACCESSOR) || dst_status == DBSTATUS_S_OK /* W2K+ */, "got %08x\n", dst_status); - ok(broken(dst_len == 0x1234) || dst_len == 8 /* W2K+ */, "got %ld\n", dst_len); + ok(broken(hr == DB_E_UNSUPPORTEDCONVERSION) || hr == S_OK /* W2K+ */, "got %08lx\n", hr); + ok(broken(dst_status == DBSTATUS_E_BADACCESSOR) || dst_status == DBSTATUS_S_OK /* W2K+ */, "got %08lx\n", dst_status); + ok(broken(dst_len == 0x1234) || dst_len == 8 /* W2K+ */, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst));
@@ -1716,9 +1716,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_GUID, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 76, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 76, "got %Id\n", dst_len); ok(!lstrcmpW(dst, guid_str), "got %s\n", wine_dbgstr_w(dst));
@@ -1727,58 +1727,58 @@ static void test_converttowstr(void) *(BSTR *)src = b; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpW(b, dst), "got %s\n", wine_dbgstr_w(dst)); SysFreeString(b);
memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_WSTR, 2, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(dst[0] == '1', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]);
memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_WSTR, 4, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpW(ten, dst), "got %s\n", wine_dbgstr_w(dst));
memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpW(ten, dst), "got %s\n", wine_dbgstr_w(dst));
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_DBTIMESTAMP, DBTYPE_WSTR, 0, &dst_len, &ts, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 38, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 38, "got %Id\n", dst_len); ok(!lstrcmpW(tsW, dst), "got %s\n", wine_dbgstr_w(dst));
dst_len = 0x1234; ts.fraction = 3; hr = IDataConvert_DataConvert(convert, DBTYPE_DBTIMESTAMP, DBTYPE_WSTR, 0, &dst_len, &ts, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 58, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 58, "got %Id\n", dst_len); ok(!lstrcmpW(ts1W, dst), "got %s\n", wine_dbgstr_w(dst));
dst_len = 0x1234; ts.fraction = 200; hr = IDataConvert_DataConvert(convert, DBTYPE_DBTIMESTAMP, DBTYPE_WSTR, 0, &dst_len, &ts, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 58, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 58, "got %Id\n", dst_len); ok(!lstrcmpW(ts2W, dst), "got %s\n", wine_dbgstr_w(dst));
/* DBTYPE_BYTES to DBTYPE_*STR unpacks binary data into a hex string */ @@ -1786,9 +1786,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_WSTR, sizeof(hexpacked_w), &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(hexpacked_w) * 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(hexpacked_w) * 4, "got %Id\n", dst_len); ok(!lstrcmpW(hexunpacked_w, dst), "got %s\n", wine_dbgstr_w(dst)); ok(dst[ARRAY_SIZE(hexpacked_w) * 4 + 1] == 0xcccc, "clobbered buffer\n");
@@ -1796,9 +1796,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(dst[0] == 0, "not null terminated\n"); ok(dst[1] == 0xcccc, "clobbered buffer\n");
@@ -1806,9 +1806,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_WSTR, 4, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2 * sizeof(WCHAR) * 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2 * sizeof(WCHAR) * 4, "got %Id\n", dst_len); ok(!memcmp(hexunpacked_w, dst, 2 * sizeof(WCHAR) * 4 ), "got %s\n", wine_dbgstr_w(dst)); ok(dst[2 * 4] == 0, "not null terminated\n"); ok(dst[2 * 4 + 1] == 0xcccc, "clobbered buffer\n"); @@ -1817,9 +1817,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_WSTR, sizeof(hexpacked_w), &dst_len, src, dst, 2 * sizeof(WCHAR) * 4 + sizeof(WCHAR), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == sizeof(hexpacked_w) * 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == sizeof(hexpacked_w) * 4, "got %Id\n", dst_len); ok(!memcmp(hexunpacked_w, dst, 2 * sizeof(WCHAR) * 4 ), "got %s\n", wine_dbgstr_w(dst)); ok(dst[2 * 4] == 0, "not null terminated\n"); ok(dst[2 * 4 + 1] == 0xcccc, "clobbered buffer\n"); @@ -1828,9 +1828,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_WSTR, sizeof(hexpacked_w), &dst_len, src, dst, 2 * sizeof(WCHAR) * 4 +1, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == sizeof(hexpacked_w) * 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == sizeof(hexpacked_w) * 4, "got %Id\n", dst_len); ok(!memcmp(hexunpacked_w, dst, 2 * sizeof(WCHAR) * 4 - 2 ), "got %s\n", wine_dbgstr_w(dst)); ok(dst[2 * 4 - 1] == 0, "not null terminated\n"); ok(dst[2 * 4] == 0xcccc, "clobbered buffer\n"); @@ -1839,9 +1839,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_WSTR, sizeof(hexpacked_w), &dst_len, src, dst, 2 * sizeof(WCHAR) * 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == sizeof(hexpacked_w) * 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == sizeof(hexpacked_w) * 4, "got %Id\n", dst_len); ok(!memcmp(hexunpacked_w, dst, 2 * sizeof(WCHAR) * 4 - 2 ), "got %s\n", wine_dbgstr_w(dst)); ok(dst[2 * 4 - 1] == 0, "not null terminated\n"); ok(dst[2 * 4] == 0xcccc, "clobbered buffer\n"); @@ -1850,9 +1850,9 @@ static void test_converttowstr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_WSTR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(dst[0] == 0, "not null terminated\n"); ok(dst[1] == 0xcccc, "clobbered buffer\n");
@@ -1860,18 +1860,18 @@ static void test_converttowstr(void) V_VT(&v) = VT_BSTR; V_BSTR(&v) = b; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_WSTR, 0, &dst_len, &v, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(!lstrcmpW(b, dst), "got %s\n", wine_dbgstr_w(dst)); VariantClear(&v);
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_WSTR, 0, &dst_len, &v, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttostr(void) @@ -1896,53 +1896,53 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == (char)0xcc, "got %02x\n", dst[1]);
memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(short *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
*(short *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_STR, 0, &dst_len, src, dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(short *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_STR, 0, &dst_len, src, NULL, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(short *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_STR, 0, &dst_len, src, dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); ok(dst[2] == (char)0xcc, "got %02x\n", dst[2]); @@ -1951,9 +1951,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_STR, 0, &dst_len, src, dst, 1, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == (char)0xcc, "got %02x\n", dst[1]);
@@ -1961,9 +1961,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_STR, 0, &dst_len, src, dst, 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == '3', "got %02x\n", dst[1]); ok(dst[2] == '2', "got %02x\n", dst[2]); @@ -1974,36 +1974,36 @@ static void test_converttostr(void) *(int *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
*(int *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_STR, 0, &dst_len, src, dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(int *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_STR, 0, &dst_len, src, NULL, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(int *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_STR, 0, &dst_len, src, dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); ok(dst[2] == (char)0xcc, "got %02x\n", dst[2]); @@ -2012,9 +2012,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_STR, 0, &dst_len, src, dst, 1, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == (char)0xcc, "got %02x\n", dst[1]);
@@ -2022,9 +2022,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_STR, 0, &dst_len, src, dst, 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == '3', "got %02x\n", dst[1]); ok(dst[2] == '2', "got %02x\n", dst[2]); @@ -2035,36 +2035,36 @@ static void test_converttostr(void) *(float *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
*(float *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_STR, 0, &dst_len, src, dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(float *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_STR, 0, &dst_len, src, NULL, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(float *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_STR, 0, &dst_len, src, dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); ok(dst[2] == (char)0xcc, "got %02x\n", dst[2]); @@ -2073,9 +2073,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_STR, 0, &dst_len, src, dst, 1, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == (char)0xcc, "got %02x\n", dst[1]);
@@ -2083,9 +2083,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_STR, 0, &dst_len, src, dst, 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == '3', "got %02x\n", dst[1]); ok(dst[2] == '2', "got %02x\n", dst[2]); @@ -2096,36 +2096,36 @@ static void test_converttostr(void) *(double *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
*(double *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_STR, 0, &dst_len, src, dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(double *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_STR, 0, &dst_len, src, NULL, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == (char)0xcc, "got %02x\n", dst[0]);
*(double *)src = 4321; memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_STR, 0, &dst_len, src, dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); ok(dst[2] == (char)0xcc, "got %02x\n", dst[2]); @@ -2134,9 +2134,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_STR, 0, &dst_len, src, dst, 1, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == 0, "got %02x\n", dst[0]); ok(dst[1] == (char)0xcc, "got %02x\n", dst[1]);
@@ -2144,9 +2144,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_STR, 0, &dst_len, src, dst, 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(dst[0] == '4', "got %02x\n", dst[0]); ok(dst[1] == '3', "got %02x\n", dst[1]); ok(dst[2] == '2', "got %02x\n", dst[2]); @@ -2160,9 +2160,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
@@ -2171,54 +2171,54 @@ static void test_converttostr(void) *(signed char *)src = 10; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I1, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA(dst, ten_a), "got %s\n", dst);
memset(src, 0, sizeof(src)); *(unsigned char *)src = 10; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI1, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA(dst, ten_a), "got %s\n", dst);
memset(src, 0, sizeof(src)); *(unsigned short *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI2, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
memset(src, 0, sizeof(src)); *(unsigned int *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
memset(src, 0, sizeof(src)); ((LARGE_INTEGER*)src)->QuadPart = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(broken(hr == DB_E_UNSUPPORTEDCONVERSION) || hr == S_OK /* W2K+ */, "got %08x\n", hr); - ok(broken(dst_status == DBSTATUS_E_BADACCESSOR) || dst_status == DBSTATUS_S_OK /* W2K+ */, "got %08x\n", dst_status); - ok(broken(dst_len == 0x1234) || dst_len == 4 /* W2K+ */, "got %ld\n", dst_len); + ok(broken(hr == DB_E_UNSUPPORTEDCONVERSION) || hr == S_OK /* W2K+ */, "got %08lx\n", hr); + ok(broken(dst_status == DBSTATUS_E_BADACCESSOR) || dst_status == DBSTATUS_S_OK /* W2K+ */, "got %08lx\n", dst_status); + ok(broken(dst_len == 0x1234) || dst_len == 4 /* W2K+ */, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
memset(src, 0, sizeof(src)); ((ULARGE_INTEGER*)src)->QuadPart = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(broken(hr == DB_E_UNSUPPORTEDCONVERSION) || hr == S_OK /* W2K+ */, "got %08x\n", hr); - ok(broken(dst_status == DBSTATUS_E_BADACCESSOR) || dst_status == DBSTATUS_S_OK /* W2K+ */, "got %08x\n", dst_status); - ok(broken(dst_len == 0x1234) || dst_len == 4 /* W2K+ */, "got %ld\n", dst_len); + ok(broken(hr == DB_E_UNSUPPORTEDCONVERSION) || hr == S_OK /* W2K+ */, "got %08lx\n", hr); + ok(broken(dst_status == DBSTATUS_E_BADACCESSOR) || dst_status == DBSTATUS_S_OK /* W2K+ */, "got %08lx\n", dst_status); + ok(broken(dst_len == 0x1234) || dst_len == 4 /* W2K+ */, "got %Id\n", dst_len); ok(!lstrcmpA(dst, fourthreetwoone), "got %s\n", dst);
@@ -2228,9 +2228,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_GUID, DBTYPE_STR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 38, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 38, "got %Id\n", dst_len); ok(!lstrcmpA(dst, guid_str), "got %s\n", dst);
@@ -2240,9 +2240,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA(ten_a, dst), "got %s\n", dst); SysFreeString(b);
@@ -2251,9 +2251,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_STR, 0, &dst_len, src, dst, 9, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == 13, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == 13, "got %Id\n", dst_len); ok(!lstrcmpA(idA, dst), "got %s\n", dst); SysFreeString(b);
@@ -2261,9 +2261,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR, sizeof(withnull), &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!memcmp(withnull, dst, 8), "got %s\n", dst); ok(dst[8] == 0, "got %02x\n", dst[8]);
@@ -2271,9 +2271,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR, 7, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 7, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 7, "got %Id\n", dst_len); ok(!memcmp(withnull, dst, 7), "got %s\n", dst); ok(dst[7] == 0, "got %02x\n", dst[7]);
@@ -2281,9 +2281,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR, 6, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 6, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 6, "got %Id\n", dst_len); ok(!memcmp(withnull, dst, 6), "got %s\n", dst); ok(dst[6] == 0, "got %02x\n", dst[6]);
@@ -2291,9 +2291,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_STR, 2, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 1, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 1, "got %Id\n", dst_len); ok(dst[0] == '1', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]);
@@ -2301,27 +2301,27 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_STR, 4, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA(ten_a, dst), "got %s\n", dst);
memcpy(src, ten, sizeof(ten)); memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA(ten_a, dst), "got %s\n", dst);
memcpy(src, ten_a, sizeof(ten_a)); memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR, 2, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(dst[0] == '1', "got %02x\n", dst[0]); ok(dst[1] == '0', "got %02x\n", dst[1]); ok(dst[2] == 0, "got %02x\n", dst[2]); @@ -2331,18 +2331,18 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR, 4, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(ten_a, dst), "got %s\n", dst);
memcpy(src, ten_a, sizeof(ten_a)); memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA(ten_a, dst), "got %s\n", dst);
@@ -2352,9 +2352,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_STR, sizeof(hexpacked_a), &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(hexpacked_a) * 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(hexpacked_a) * 2, "got %Id\n", dst_len); ok(!lstrcmpA(hexunpacked_a, dst), "got %s\n", dst); ok(dst[ARRAY_SIZE(hexpacked_a) * 4 + 1] == (char)0xcc, "clobbered buffer\n");
@@ -2362,9 +2362,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(dst[0] == 0, "not null terminated\n"); ok(dst[1] == (char)0xcc, "clobbered buffer\n");
@@ -2372,9 +2372,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_STR, 4, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2 * sizeof(char) * 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2 * sizeof(char) * 4, "got %Id\n", dst_len); ok(!memcmp(hexunpacked_a, dst, 2 * sizeof(char) * 4 ), "got %s\n", dst); ok(dst[2 * 4] == 0, "not null terminated\n"); ok(dst[2 * 4 + 1] == (char)0xcc, "clobbered buffer\n"); @@ -2383,9 +2383,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_STR, sizeof(hexpacked_a), &dst_len, src, dst, 2 * sizeof(char) * 4 + sizeof(char), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == sizeof(hexpacked_a) * 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == sizeof(hexpacked_a) * 2, "got %Id\n", dst_len); ok(!memcmp(hexunpacked_a, dst, 2 * sizeof(char) * 4 ), "got %s\n", dst); ok(dst[2 * 4] == 0, "not null terminated\n"); ok(dst[2 * 4 + 1] == (char)0xcc, "clobbered buffer\n"); @@ -2394,9 +2394,9 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_STR, sizeof(hexpacked_a), &dst_len, src, dst, 2 * sizeof(char) * 4, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == sizeof(hexpacked_a) * 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == sizeof(hexpacked_a) * 2, "got %Id\n", dst_len); ok(!memcmp(hexunpacked_a, dst, 2 * sizeof(char) * 4 - 2 ), "got %s\n", dst); ok(dst[2 * 4 - 1] == 0, "not null terminated\n"); ok(dst[2 * 4] == (char)0xcc, "clobbered buffer\n"); @@ -2405,18 +2405,18 @@ static void test_converttostr(void) memset(dst, 0xcc, sizeof(dst)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_STR, 0, &dst_len, src, dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(dst[0] == 0, "not null terminated\n"); ok(dst[1] == (char)0xcc, "clobbered buffer\n");
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_STR, 0, &dst_len, &v, dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttobyrefwstr(void) @@ -2434,35 +2434,35 @@ static void test_converttobyrefwstr(void) VariantInit(&v);
hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_BYREF | DBTYPE_WSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(dst[0] == 0, "got %04x\n", dst[0]); CoTaskMemFree(dst);
dst = (void*)0x12345678; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_BYREF | DBTYPE_WSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst == (void*)0x12345678, "got %p\n", dst);
*(short *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_BYREF | DBTYPE_WSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst)); CoTaskMemFree(dst);
*(short *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_BYREF | DBTYPE_WSTR, 0, &dst_len, src, &dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!lstrcmpW(dst, fourthreetwoone), "got %s\n", wine_dbgstr_w(dst)); CoTaskMemFree(dst);
@@ -2470,9 +2470,9 @@ static void test_converttobyrefwstr(void) *(BSTR *)src = b; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_BYREF | DBTYPE_WSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpW(b, dst), "got %s\n", wine_dbgstr_w(dst)); CoTaskMemFree(dst); SysFreeString(b); @@ -2480,9 +2480,9 @@ static void test_converttobyrefwstr(void) memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_BYREF | DBTYPE_WSTR, 2, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(dst[0] == '1', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); CoTaskMemFree(dst); @@ -2490,27 +2490,27 @@ static void test_converttobyrefwstr(void) memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_BYREF | DBTYPE_WSTR, 4, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpW(ten, dst), "got %s\n", wine_dbgstr_w(dst)); CoTaskMemFree(dst);
memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_BYREF | DBTYPE_WSTR, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpW(ten, dst), "got %s\n", wine_dbgstr_w(dst)); CoTaskMemFree(dst);
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_BYREF | DBTYPE_WSTR, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttobyrefstr(void) @@ -2528,35 +2528,35 @@ static void test_converttobyrefstr(void) VariantInit(&v);
hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_STR | DBTYPE_BYREF, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len); ok(dst[0] == 0, "got %04x\n", dst[0]); CoTaskMemFree(dst);
dst = (void*)0x12345678; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_STR | DBTYPE_BYREF, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst == (void*)0x12345678, "got %p\n", dst);
*(short *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_STR | DBTYPE_BYREF, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, "4321"), "got %s\n", dst); CoTaskMemFree(dst);
*(short *)src = 4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_STR | DBTYPE_BYREF, 0, &dst_len, src, &dst, 0, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 4, "got %Id\n", dst_len); ok(!lstrcmpA(dst, "4321"), "got %s\n", dst); CoTaskMemFree(dst);
@@ -2564,9 +2564,9 @@ static void test_converttobyrefstr(void) *(BSTR *)src = b; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_STR | DBTYPE_BYREF, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA("10", dst), "got %s\n", dst); CoTaskMemFree(dst); SysFreeString(b); @@ -2574,9 +2574,9 @@ static void test_converttobyrefstr(void) memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_STR | DBTYPE_BYREF, 2, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 1, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 1, "got %Id\n", dst_len); ok(dst[0] == '1', "got %02x\n", dst[0]); ok(dst[1] == 0, "got %02x\n", dst[1]); CoTaskMemFree(dst); @@ -2584,27 +2584,27 @@ static void test_converttobyrefstr(void) memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_STR | DBTYPE_BYREF, 4, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA("10", dst), "got %s\n", dst); CoTaskMemFree(dst);
memcpy(src, ten, sizeof(ten)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_STR | DBTYPE_BYREF, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 2, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 2, "got %Id\n", dst_len); ok(!lstrcmpA("10", dst), "got %s\n", dst); CoTaskMemFree(dst);
memcpy(src, withnull, sizeof(withnull)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR | DBTYPE_BYREF, sizeof(withnull), &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 8, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 8, "got %Id\n", dst_len); ok(!memcmp(withnull, dst, 8), "got %s\n", dst); ok(dst[8] == 0, "got %02x\n", dst[8]); CoTaskMemFree(dst); @@ -2612,9 +2612,9 @@ static void test_converttobyrefstr(void) memcpy(src, withnull, sizeof(withnull)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR | DBTYPE_BYREF, 7, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 7, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 7, "got %Id\n", dst_len); ok(!memcmp(withnull, dst, 7), "got %s\n", dst); ok(dst[7] == 0, "got %02x\n", dst[7]); CoTaskMemFree(dst); @@ -2622,9 +2622,9 @@ static void test_converttobyrefstr(void) memcpy(src, withnull, sizeof(withnull)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_STR | DBTYPE_BYREF, 6, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == 6, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == 6, "got %Id\n", dst_len); ok(!memcmp(withnull, dst, 6), "got %s\n", dst); ok(dst[6] == 0, "got %02x\n", dst[6]); CoTaskMemFree(dst); @@ -2633,9 +2633,9 @@ static void test_converttobyrefstr(void) dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_STR | DBTYPE_BYREF, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttoguid(void) @@ -2652,34 +2652,34 @@ static void test_converttoguid(void) dst = IID_IDCInfo; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_GUID, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(GUID), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(GUID), "got %Id\n", dst_len); ok(IsEqualGUID(&dst, &GUID_NULL), "didn't get GUID_NULL\n");
dst = IID_IDCInfo; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_GUID, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(IsEqualGUID(&dst, &IID_IDCInfo), "dst has changed\n");
dst = IID_IDCInfo; memcpy(src, &IID_IDataConvert, sizeof(GUID)); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_GUID, DBTYPE_GUID, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(GUID), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(GUID), "got %Id\n", dst_len); ok(IsEqualGUID(&dst, &IID_IDataConvert), "didn't get IID_IDataConvert\n");
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_GUID, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttofiletime(void) @@ -2700,21 +2700,21 @@ static void test_converttofiletime(void) hr = IDataConvert_DataConvert(convert, DBTYPE_FILETIME, DBTYPE_FILETIME, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); ok(hr == S_OK || broken(hr == DB_E_BADBINDINFO), /* win98 */ - "got %08x\n", hr); + "got %08lx\n", hr); if(SUCCEEDED(hr)) { - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); - ok(dst.dwLowDateTime == 0x12345678, "got %08x\n", dst.dwLowDateTime); - ok(dst.dwHighDateTime == 0x9abcdef0, "got %08x\n", dst.dwHighDateTime); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); + ok(dst.dwLowDateTime == 0x12345678, "got %08lx\n", dst.dwLowDateTime); + ok(dst.dwHighDateTime == 0x9abcdef0, "got %08lx\n", dst.dwHighDateTime); }
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_FILETIME, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttoui1(void) @@ -2731,43 +2731,43 @@ static void test_converttoui1(void) dst = 0x12; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0, "got %08x\n", dst);
dst = 0x12; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst == 0x12, "got %08x\n", dst);
dst = 0x12; src[0] = 0x43; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI1, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x43, "got %08x\n", dst);
dst = 0x12; src[0] = 0xfe; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI1, DBTYPE_UI1, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0xfe, "got %08x\n", dst);
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_UI1, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttoui4(void) @@ -2781,63 +2781,63 @@ static void test_converttoui4(void) dst = 0x12345678; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_UI4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); - ok(dst == 0, "got %08x\n", dst); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); + ok(dst == 0, "got %08lx\n", dst);
dst = 0x12345678; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_UI4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); - ok(dst == 0x12345678, "got %08x\n", dst); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); + ok(dst == 0x12345678, "got %08lx\n", dst);
dst = 0x12345678; *(DWORD*)src = 0x87654321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_UI4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); - ok(dst == 0x87654321, "got %08x\n", dst); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); + ok(dst == 0x87654321, "got %08lx\n", dst);
dst = 0x12345678; *(signed short *)src = 0x4321; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_UI4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); - ok(dst == 0x4321, "got %08x\n", dst); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); + ok(dst == 0x4321, "got %08lx\n", dst);
dst = 0x12345678; *(signed short *)src = -1; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_UI4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); todo_wine - ok(dst_status == DBSTATUS_E_SIGNMISMATCH, "got %08x\n", dst_status); + ok(dst_status == DBSTATUS_E_SIGNMISMATCH, "got %08lx\n", dst_status); todo_wine - ok(broken(dst_len == sizeof(dst)) || dst_len == 0x1234 /* W2K+ */, "got %ld\n", dst_len); - ok(dst == 0x12345678, "got %08x\n", dst); + ok(broken(dst_len == sizeof(dst)) || dst_len == 0x1234 /* W2K+ */, "got %Id\n", dst_len); + ok(dst == 0x12345678, "got %08lx\n", dst);
dst_len = dst = 0x1234; V_VT((VARIANT*)src) = VT_I2; V_I2((VARIANT*)src) = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_UI4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); - ok(dst == 0x4321, "got %08x\n", dst); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); + ok(dst == 0x4321, "got %08lx\n", dst);
dst_len = 44; V_VT((VARIANT*)src) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_UI4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttor4(void) @@ -2854,51 +2854,51 @@ static void test_converttor4(void) dst = 1.0; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_R4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0.0, "got %f\n", dst);
dst = 1.0; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_R4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst == 1.0, "got %f\n", dst);
dst = 1.0; *(signed int*)src = 12345678; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_R4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 12345678.0, "got %f\n", dst);
dst = 1.0; *(FLOAT *)src = 10.0; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_R4, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10.0, "got %f\n", dst);
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_R4, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len);
dst_len = dst = 0x1234; V_VT(&v) = VT_I2; V_I2(&v) = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_R4, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %f\n", dst); }
@@ -2914,52 +2914,52 @@ static void test_converttor8(void) dst = 1.0; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_R8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0.0, "got %f\n", dst);
dst = 1.0; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_R8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst == 1.0, "got %f\n", dst);
dst = 1.0; *(signed int*)src = 12345678; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_R8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 12345678.0, "got %f\n", dst);
dst = 1.0; *(FLOAT *)src = 10.0; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_R8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 10.0, "got %f\n", dst);
dst_len = dst = 0x1234; V_VT(&var) = VT_I2; V_I2(&var) = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_R8, 0, &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0x4321, "got %f\n", dst);
dst_len = 44; V_VT(&var) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_R8, 0, &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttocy(void) @@ -2976,43 +2976,43 @@ static void test_converttocy(void) dst.int64 = 0xcc; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_CY, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(CY), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(CY), "got %Id\n", dst_len); ok(dst.int64 == 0, "didn't get 0\n");
dst.int64 = 0xcc; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_CY, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst.int64 == 0xcc, "dst changed\n");
dst.int64 = 0xcc; *(int*)src = 1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_CY, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(CY), "got %ld\n", dst_len); - ok(dst.int64 == 12340000, "got %d\n", dst.s.Lo); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(CY), "got %Id\n", dst_len); + ok(dst.int64 == 12340000, "got %ld\n", dst.s.Lo);
dst.int64 = 0xcc; ((CY*)src)->int64 = 1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_CY, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(CY), "got %ld\n", dst_len); - ok(dst.int64 == 1234, "got %d\n", dst.s.Lo); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(CY), "got %Id\n", dst_len); + ok(dst.int64 == 1234, "got %ld\n", dst.s.Lo);
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_CY, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttoui8(void) @@ -3029,54 +3029,54 @@ static void test_converttoui8(void) dst.QuadPart = 0xcc; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_UI8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst.QuadPart == 0, "got %d\n", (int)dst.QuadPart);
dst.QuadPart = 0xcc; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_NULL, DBTYPE_UI8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08lx\n", dst_status); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst.QuadPart == 0xcc, "dst changed\n");
dst.QuadPart = 0xcc; *(int*)src = 1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_UI8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst.QuadPart == 1234, "got %d\n", (int)dst.QuadPart);
dst.QuadPart = 0xcc; *(int*)src = -1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_UI8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); + ok(hr == DB_E_ERRORSOCCURRED, "got %08lx\n", hr); todo_wine - ok(dst_status == DBSTATUS_E_SIGNMISMATCH, "got %08x\n", dst_status); + ok(dst_status == DBSTATUS_E_SIGNMISMATCH, "got %08lx\n", dst_status); todo_wine - ok(dst_len == 0x1234, "got %ld\n", dst_len); + ok(dst_len == 0x1234, "got %Id\n", dst_len); ok(dst.QuadPart == 0xcc, "got %d\n", (int)dst.QuadPart);
dst.QuadPart = 0xcc; ((ULARGE_INTEGER*)src)->QuadPart = 1234; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_UI8, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst.QuadPart == 1234, "got %d\n", (int)dst.QuadPart);
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_UI8, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_getconversionsize(void) @@ -3104,64 +3104,64 @@ static void test_getconversionsize(void) /* same way as CanConvert fails here */ dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_NULL, DBTYPE_BSTR, NULL, &dst_len, NULL); - ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got 0x%08x\n", hr); + ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got 0x%08lx\n", hr);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I2, DBTYPE_I4, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 4, "got %ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 4, "got %Id\n", dst_len);
hr = IDataConvert_GetConversionSize(convert, DBTYPE_I2, DBTYPE_I4, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* size doesn't include string size */ str = SysAllocStringLen(NULL, 10); dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_BSTR, DBTYPE_VARIANT, NULL, &dst_len, str); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == sizeof(VARIANT), "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == sizeof(VARIANT), "%Id\n", dst_len); SysFreeString(str);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_WSTR, DBTYPE_WSTR, NULL, &dst_len, strW); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 10, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 10, "%Id\n", dst_len);
dst_len = 0; src_len = 2; hr = IDataConvert_GetConversionSize(convert, DBTYPE_WSTR, DBTYPE_WSTR, &src_len, &dst_len, strW); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 4, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 4, "%Id\n", dst_len);
dst_len = 0; src_len = 20; hr = IDataConvert_GetConversionSize(convert, DBTYPE_WSTR, DBTYPE_WSTR, &src_len, &dst_len, strW); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 22, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 22, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_STR, DBTYPE_WSTR, NULL, &dst_len, strTest); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 10 || broken(dst_len == 12), "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 10 || broken(dst_len == 12), "%Id\n", dst_len);
dst_len = 0; src_len = 2; hr = IDataConvert_GetConversionSize(convert, DBTYPE_STR, DBTYPE_WSTR, &src_len, &dst_len, strTest); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 6, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 6, "%Id\n", dst_len);
dst_len = 0; src_len = 20; hr = IDataConvert_GetConversionSize(convert, DBTYPE_STR, DBTYPE_WSTR, &src_len, &dst_len, strTest); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 42, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 42, "%Id\n", dst_len);
dst_len = 0; V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(strW); hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_WSTR, NULL, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 10, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 10, "%Id\n", dst_len); VariantClear(&var);
dst_len = 0; @@ -3169,8 +3169,8 @@ static void test_getconversionsize(void) V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(strW); hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_WSTR, &src_len, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 10, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 10, "%Id\n", dst_len); VariantClear(&var);
dst_len = 0; @@ -3178,7 +3178,7 @@ static void test_getconversionsize(void) V_VT(&var) = VT_I4; V_I4(&var) = 4; hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_WSTR, &src_len, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); VariantClear(&var);
dst_len = 0; @@ -3186,15 +3186,15 @@ static void test_getconversionsize(void) V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(strW); hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_STR, &src_len, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 5, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 5, "%Id\n", dst_len); VariantClear(&var);
src_len = 20; V_VT(&var) = VT_I4; V_I4(&var) = 4; hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_STR, &src_len, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); VariantClear(&var);
dst_len = 0; @@ -3202,8 +3202,8 @@ static void test_getconversionsize(void) V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(strW); hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_BYTES, &src_len, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 2, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 2, "%Id\n", dst_len); VariantClear(&var);
dst_len = 0; @@ -3215,8 +3215,8 @@ static void test_getconversionsize(void) V_VT(&var) = VT_ARRAY|VT_UI1; V_ARRAY(&var) = psa; hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_BYTES, &src_len, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 1802, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 1802, "%Id\n", dst_len); VariantClear(&var);
/* On Windows, NULL variants being convert to a non-fixed sized type will return a dst_len of @@ -3225,337 +3225,337 @@ static void test_getconversionsize(void) dst_len = 32; V_VT(&var) = VT_NULL; hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_I4, NULL, &dst_len, &var); - ok(dst_len == 4, "%ld\n", dst_len); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(dst_len == 4, "%Id\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr);
V_VT(&var) = VT_NULL; hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_STR, NULL, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
V_VT(&var) = VT_NULL; hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_WSTR, NULL, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
src_len = 20; V_VT(&var) = VT_NULL; hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT, DBTYPE_BYTES, &src_len, &dst_len, &var); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len); VariantClear(&var);
hr = IDataConvert_GetConversionSize(convert, DBTYPE_NUMERIC, DBTYPE_NUMERIC, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == sizeof(DB_NUMERIC), "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == sizeof(DB_NUMERIC), "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i4); hr = IDataConvert_GetConversionSize(convert, DBTYPE_I4, DBTYPE_WSTR, &src_len, &dst_len, &i4); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I4, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i4); hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI4, DBTYPE_WSTR, &src_len, &dst_len, &i4); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI4, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i2); hr = IDataConvert_GetConversionSize(convert, DBTYPE_I2, DBTYPE_WSTR, &src_len, &dst_len, &i2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I2, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i2); hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI2, DBTYPE_WSTR, &src_len, &dst_len, &i2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i1); hr = IDataConvert_GetConversionSize(convert, DBTYPE_I1, DBTYPE_WSTR, &src_len, &dst_len, &i1); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I1, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i2); hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI2, DBTYPE_WSTR, &src_len, &dst_len, &i2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI2, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(f4); hr = IDataConvert_GetConversionSize(convert, DBTYPE_R4, DBTYPE_WSTR, &src_len, &dst_len, &f4); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_R4, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i8); hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI8, DBTYPE_WSTR, &src_len, &dst_len, &i8); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI8, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i8); hr = IDataConvert_GetConversionSize(convert, DBTYPE_I8, DBTYPE_WSTR, &src_len, &dst_len, &i8); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I8, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(dbdate); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DATE, DBTYPE_WSTR, &src_len, &dst_len, &dbdate); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DATE, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(dec); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DECIMAL, DBTYPE_WSTR, &src_len, &dst_len, &dec); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DECIMAL, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_EMPTY, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(ts); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBTIMESTAMP, DBTYPE_WSTR, &src_len, &dst_len, &ts); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBTIMESTAMP, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(dbtime); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBTIME, DBTYPE_WSTR, &src_len, &dst_len, &dbtime); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBTIME, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(dbdate1); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBDATE, DBTYPE_WSTR, &src_len, &dst_len, &dbdate1); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBDATE, DBTYPE_WSTR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i4); hr = IDataConvert_GetConversionSize(convert, DBTYPE_I4, DBTYPE_STR, &src_len, &dst_len, &i4); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I4, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i4); hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI4, DBTYPE_STR, &src_len, &dst_len, &i4); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI4, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i2); hr = IDataConvert_GetConversionSize(convert, DBTYPE_I2, DBTYPE_STR, &src_len, &dst_len, &i2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I2, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i2); hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI2, DBTYPE_STR, &src_len, &dst_len, &i2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i1); hr = IDataConvert_GetConversionSize(convert, DBTYPE_I1, DBTYPE_STR, &src_len, &dst_len, &i1); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I1, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i2); hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI2, DBTYPE_STR, &src_len, &dst_len, &i2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI2, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(f4); hr = IDataConvert_GetConversionSize(convert, DBTYPE_R4, DBTYPE_STR, &src_len, &dst_len, &f4); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_R4, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i8); hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI8, DBTYPE_STR, &src_len, &dst_len, &i8); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_UI8, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(i8); hr = IDataConvert_GetConversionSize(convert, DBTYPE_I8, DBTYPE_STR, &src_len, &dst_len, &i8); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_I8, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(dbdate); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DATE, DBTYPE_STR, &src_len, &dst_len, &dbdate); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DATE, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(dec); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DECIMAL, DBTYPE_STR, &src_len, &dst_len, &dec); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DECIMAL, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_EMPTY, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(ts); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBTIMESTAMP, DBTYPE_STR, &src_len, &dst_len, &ts); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBTIMESTAMP, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(dbtime); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBTIME, DBTYPE_STR, &src_len, &dst_len, &dbtime); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBTIME, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; src_len = sizeof(dbdate1); hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBDATE, DBTYPE_STR, &src_len, &dst_len, &dbdate1); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len);
dst_len = 0; hr = IDataConvert_GetConversionSize(convert, DBTYPE_DBDATE, DBTYPE_STR, NULL, &dst_len, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 110, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 110, "%Id\n", dst_len); }
static void test_converttobytes(void) @@ -3572,24 +3572,24 @@ static void test_converttobytes(void)
dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_BYTES, sizeof(byte_src), &dst_len, byte_src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(byte_src), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(byte_src), "got %Id\n", dst_len); ok(!memcmp(byte_src, dst, dst_len ), "bytes differ\n");
dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_BYTES, sizeof(byte_src), &dst_len, byte_src, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08x\n", dst_status); - ok(dst_len == sizeof(byte_src), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_TRUNCATED, "got %08lx\n", dst_status); + ok(dst_len == sizeof(byte_src), "got %Id\n", dst_len); ok(!memcmp(byte_src, dst, 2 ), "bytes differ\n");
V_VT(&v) = VT_NULL; dst_len = 77; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_BYTES, sizeof(v), &dst_len, &v, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 77, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 77, "got %Id\n", dst_len);
dst_len = 0; rgsabound[0].lLbound = 0; @@ -3599,17 +3599,17 @@ static void test_converttobytes(void) V_VT(&v) = VT_ARRAY|VT_UI1; V_ARRAY(&v) = psa; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_BYTES, sizeof(v), &dst_len, &v, &dst, 10, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dst_len == 4, "%ld\n", dst_len); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dst_len == 4, "%Id\n", dst_len); ok(!memcmp(byte_dst, dst, dst_len), "bytes differ\n"); VariantClear(&v);
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_BYTES, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len);
}
@@ -3626,18 +3626,18 @@ static void test_converttobytesbyref(void)
dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_BYTES | DBTYPE_BYREF, sizeof(byte_src), &dst_len, byte_src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(byte_src), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(byte_src), "got %Id\n", dst_len); ok(!memcmp(byte_src, dst, dst_len ), "bytes differ\n"); CoTaskMemFree(dst);
dst_len = 44; V_VT(&v) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_BYTES | DBTYPE_BYREF, 0, &dst_len, &v, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
static void test_converttodbdate(void) @@ -3653,9 +3653,9 @@ static void test_converttodbdate(void)
dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_DBDATE, DBTYPE_DBDATE, sizeof(ts), &dst_len, &ts, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(DBDATE), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(DBDATE), "got %Id\n", dst_len); ok(!memcmp(&ts, &dst, sizeof(DBDATE) ), "bytes differ\n");
VariantInit(&var); @@ -3663,45 +3663,45 @@ static void test_converttodbdate(void) V_DATE(&var) = 41408.086250; dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DBDATE, sizeof(var), &dst_len, &var, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(DBDATE), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(DBDATE), "got %Id\n", dst_len); ok(!memcmp(&ts, &dst, sizeof(DBDATE) ), "bytes differ\n");
V_VT(&var) = VT_R8; V_R8(&var) = 41408.086250; dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DBDATE, sizeof(var), &dst_len, &var, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(DBDATE), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(DBDATE), "got %Id\n", dst_len); ok(!memcmp(&ts, &dst, sizeof(DBDATE) ), "bytes differ\n");
V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(strW); dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DBDATE, sizeof(var), &dst_len, &var, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(DBDATE), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(DBDATE), "got %Id\n", dst_len); ok(!memcmp(&ts, &dst, sizeof(DBDATE) ), "bytes differ\n"); VariantClear(&var);
dst_len = 0; bstr = SysAllocString(strW); hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_DBDATE, 0, &dst_len, &bstr, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(DBDATE), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(DBDATE), "got %Id\n", dst_len); ok(!memcmp(&ts, &dst, sizeof(DBDATE) ), "bytes differ\n"); SysFreeString(bstr);
V_VT(&var) = VT_NULL; dst_len = 88; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DBDATE, sizeof(var), &dst_len, &var, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 88, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 88, "got %Id\n", dst_len); }
@@ -3731,9 +3731,9 @@ static void test_converttovar(void) dst_len = 0; dst_status = DBSTATUS_S_DEFAULT; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_VARIANT, sizeof(strW), &dst_len, strW, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_BSTR, "got %d\n", V_VT(&dst)); ok(!lstrcmpW(V_BSTR(&dst), strW), "got %s\n", wine_dbgstr_w(V_BSTR(&dst))); VariantClear(&dst); @@ -3741,7 +3741,7 @@ static void test_converttovar(void) /* with null dest length and status */ V_VT(&dst) = VT_EMPTY; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_VARIANT, sizeof(strW), NULL, strW, &dst, sizeof(dst), 0, NULL, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(V_VT(&dst) == VT_BSTR, "got %d\n", V_VT(&dst)); ok(!lstrcmpW(V_BSTR(&dst), strW), "got %s\n", wine_dbgstr_w(V_BSTR(&dst))); VariantClear(&dst); @@ -3751,9 +3751,9 @@ static void test_converttovar(void) i8.QuadPart = 12345; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_VARIANT, sizeof(i8), &dst_len, &i8, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_DECIMAL, "got %d\n", V_VT(&dst)); ok(S(U(V_DECIMAL(&dst))).scale == 0 && S(U(V_DECIMAL(&dst))).sign == 0 && V_DECIMAL(&dst).Hi32 == 0 && U1(V_DECIMAL(&dst)).Lo64 == 12345, "Not Equal\n"); @@ -3762,9 +3762,9 @@ static void test_converttovar(void) dst_len = 0; dst_status = DBSTATUS_S_DEFAULT; hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_VARIANT, sizeof(fvalue), &dst_len, &fvalue, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_R4, "got %d\n", V_VT(&dst)); ok(V_R4(&dst) == 543.21f, "got %f\n", V_R4(&dst));
@@ -3772,9 +3772,9 @@ static void test_converttovar(void) dst_len = 0; dst_status = DBSTATUS_S_DEFAULT; hr = IDataConvert_DataConvert(convert, DBTYPE_R8, DBTYPE_VARIANT, sizeof(dvalue), &dst_len, &dvalue, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_R8, "got %d\n", V_VT(&dst)); ok(V_R8(&dst) == 123.56, "got %f\n", V_R8(&dst));
@@ -3782,9 +3782,9 @@ static void test_converttovar(void) dst_len = 0; dst_status = DBSTATUS_S_DEFAULT; hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_VARIANT, sizeof(boolean), &dst_len, &boolean, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_BOOL, "got %d\n", V_VT(&dst)); ok(V_BOOL(&dst) == VARIANT_TRUE, "got %d\n", V_BOOL(&dst));
@@ -3793,20 +3793,20 @@ static void test_converttovar(void) dst_status = DBSTATUS_S_DEFAULT; i4 = 123; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_VARIANT, sizeof(i4), &dst_len, &i4, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_I4, "got %d\n", V_VT(&dst)); - ok(V_I4(&dst) == 123, "got %d\n", V_I4(&dst)); + ok(V_I4(&dst) == 123, "got %ld\n", V_I4(&dst));
V_VT(&dst) = VT_EMPTY; dst_len = 0; dst_status = DBSTATUS_S_DEFAULT; i2 = 123; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_VARIANT, sizeof(i2), &dst_len, &i2, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_I2, "got %d\n", V_VT(&dst)); ok(V_I2(&dst) == 123, "got %d\n", V_I2(&dst));
@@ -3815,9 +3815,9 @@ static void test_converttovar(void) dst_status = DBSTATUS_S_DEFAULT; date = 123.123; hr = IDataConvert_DataConvert(convert, DBTYPE_DATE, DBTYPE_VARIANT, sizeof(date), &dst_len, &date, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_DATE, "got %d\n", V_VT(&dst)); ok(V_DATE(&dst) == 123.123, "got %f\n", V_DATE(&dst));
@@ -3827,75 +3827,75 @@ static void test_converttovar(void) S(cy).Lo = 1; S(cy).Hi = 2; hr = IDataConvert_DataConvert(convert, DBTYPE_CY, DBTYPE_VARIANT, sizeof(cy), &dst_len, &cy, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_CY, "got %d\n", V_VT(&dst));
cy2 = V_CY(&dst); - ok(S(cy2).Lo == S(cy).Lo && S(cy2).Hi == S(cy).Hi, "got %d,%d\n", S(cy2).Lo, S(cy2).Hi); + ok(S(cy2).Lo == S(cy).Lo && S(cy2).Hi == S(cy).Hi, "got %ld,%ld\n", S(cy2).Lo, S(cy2).Hi);
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_VARIANT, sizeof(byte_src), &dst_len, &byte_src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == (VT_ARRAY|VT_UI1), "got %d\n", V_VT(&dst)); if(V_VT(&dst) == (VT_ARRAY|VT_UI1)) { LONG l;
hr = SafeArrayGetUBound(V_ARRAY(&dst), 1, &l); - ok(hr == S_OK, "got %08x\n", hr); - ok(l == 4, "got %d\n", l); /* 5 elements */ + ok(hr == S_OK, "got %08lx\n", hr); + ok(l == 4, "got %ld\n", l); /* 5 elements */ } VariantClear(&dst);
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_VARIANT, 0, &dst_len, &byte_src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == (VT_ARRAY|VT_UI1), "got %d\n", V_VT(&dst)); if(V_VT(&dst) == (VT_ARRAY|VT_UI1)) { LONG l;
hr = SafeArrayGetUBound(V_ARRAY(&dst), 1, &l); - ok(hr == S_OK, "got %08x\n", hr); - ok(l == -1, "got %d\n", l); /* 0 elements */ + ok(hr == S_OK, "got %08lx\n", hr); + ok(l == -1, "got %ld\n", l); /* 0 elements */ } VariantClear(&dst);
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BYTES, DBTYPE_VARIANT, 2, &dst_len, &byte_src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == (VT_ARRAY|VT_UI1), "got %d\n", V_VT(&dst)); if(V_VT(&dst) == (VT_ARRAY|VT_UI1)) { LONG l;
hr = SafeArrayGetUBound(V_ARRAY(&dst), 1, &l); - ok(hr == S_OK, "got %08x\n", hr); - ok(l == 1, "got %d\n", l); /* 2 elements */ + ok(hr == S_OK, "got %08lx\n", hr); + ok(l == 1, "got %ld\n", l); /* 2 elements */ } VariantClear(&dst);
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_DBTIMESTAMP, DBTYPE_VARIANT, 0, &dst_len, &ts, &dst, sizeof(ts), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_DATE, "got %d\n", V_VT(&dst)); ok( (float)V_DATE(&dst) == 41408.086250f, "got %f\n", V_DATE(&dst));
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_DBDATE, DBTYPE_VARIANT, 0, &dst_len, &dbdate, &dst, sizeof(dbdate), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(V_VT(&dst) == VT_DATE, "got %d\n", V_VT(&dst)); ok( (float)V_DATE(&dst) == 41409.0, "got %f\n", V_DATE(&dst));
@@ -3903,16 +3903,16 @@ static void test_converttovar(void) i4 = 123; dst_len = 99; hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_VARIANT, sizeof(i4), &dst_len, &i4, &dst, sizeof(dst), DBSTATUS_S_ISNULL, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len);
dst_len = 44; V_VT(&var) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_VARIANT, 0, &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == sizeof(VARIANT), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == sizeof(VARIANT), "got %Id\n", dst_len);
}
@@ -3936,59 +3936,59 @@ static void test_converttotimestamp(void) V_DATE(&var) = 41408.086250; dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DBTIMESTAMP, 0, &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(!memcmp(&ts, &dst, sizeof(ts)), "Wrong timestamp\n");
bstr = SysAllocString(strW); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_DBTIMESTAMP, 0, &dst_len, &bstr, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(!memcmp(&ts, &dst, sizeof(ts)), "Wrong timestamp\n"); SysFreeString(bstr);
bstr = SysAllocString(strFullW); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_DBTIMESTAMP, 0, &dst_len, &bstr, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(!memcmp(&ts1, &dst, sizeof(ts1)), "Wrong timestamp\n"); SysFreeString(bstr);
bstr = SysAllocString(L"2013-05-14 02:04:12.017000000"); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_DBTIMESTAMP, 0, &dst_len, &bstr, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(!memcmp(&ts1, &dst, sizeof(ts1)), "Wrong timestamp\n"); SysFreeString(bstr);
bstr = SysAllocString(L"2013/05/14 02:04:12.01700"); dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_DBTIMESTAMP, 0, &dst_len, &bstr, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DISP_E_TYPEMISMATCH, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_CANTCONVERTVALUE, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == DISP_E_TYPEMISMATCH, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_E_CANTCONVERTVALUE, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); SysFreeString(bstr);
V_VT(&var) = VT_NULL; dst_len = 77; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DBTIMESTAMP, sizeof(var), &dst_len, &var, &dst, 2, 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 77, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 77, "got %Id\n", dst_len);
dst_len = 0x1234; date = 41408.086250; hr = IDataConvert_DataConvert(convert, DBTYPE_DATE, DBTYPE_DBTIMESTAMP, 0, &dst_len, &date, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(!memcmp(&ts, &dst, sizeof(ts)), "Wrong timestamp\n"); }
@@ -4005,16 +4005,16 @@ static void test_converttoiunknown(void)
dst_len = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_IUNKNOWN, sizeof(strW), &dst_len, strW, dst, sizeof(dst), DBSTATUS_S_ISNULL, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 0, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 0, "got %Id\n", dst_len);
dst_len = 44; V_VT(&var) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_IUNKNOWN, 0, &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 44, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 44, "got %Id\n", dst_len); }
#define test_numeric_val(current, expected) _test_numeric_val(__LINE__, current, expected); @@ -4058,9 +4058,9 @@ static void test_converttonumeric(void) dst.scale = 30; memset(dst.val, 0xfe, sizeof(dst.val)); hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_NUMERIC, 0, &dst_len, &i, &dst, sizeof(dst), 0, &dst_status, 10, 0, 0); - todo_wine ok(hr == S_OK, "got %08x\n", hr); - todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - todo_wine ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + todo_wine ok(hr == S_OK, "got %08lx\n", hr); + todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + todo_wine ok(dst_len == sizeof(dst), "got %Id\n", dst_len); todo_wine test_numeric_val(&dst, &result1);
i8.QuadPart = 12345; @@ -4068,9 +4068,9 @@ static void test_converttonumeric(void) dst.scale = 30; memset(dst.val, 0xfe, sizeof(dst.val)); hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_NUMERIC, sizeof(i8), &dst_len, &i8, &dst, sizeof(dst), 0, &dst_status, 10, 0, 0); - todo_wine ok(hr == S_OK, "got %08x\n", hr); - todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - todo_wine ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + todo_wine ok(hr == S_OK, "got %08lx\n", hr); + todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + todo_wine ok(dst_len == sizeof(dst), "got %Id\n", dst_len); todo_wine test_numeric_val(&dst, &result2);
dst_len = 0x1234; @@ -4078,9 +4078,9 @@ static void test_converttonumeric(void) dst.sign = 1; memset(dst.val, 0xfe, sizeof(dst.val)); hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_NUMERIC, sizeof(boolean), &dst_len, &boolean, &dst, sizeof(dst), 0, &dst_status, 10, 0, 0); - todo_wine ok(hr == S_OK, "got %08x\n", hr); - todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - todo_wine ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + todo_wine ok(hr == S_OK, "got %08lx\n", hr); + todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + todo_wine ok(dst_len == sizeof(dst), "got %Id\n", dst_len); todo_wine test_numeric_val(&dst, &result3);
dst_len = 0x1234; @@ -4088,9 +4088,9 @@ static void test_converttonumeric(void) dst.sign = 0; memset(dst.val, 0xfe, sizeof(dst.val)); hr = IDataConvert_DataConvert(convert, DBTYPE_R4, DBTYPE_NUMERIC, sizeof(fvalue), &dst_len, &fvalue, &dst, sizeof(dst), 0, &dst_status, 10, 0, 0); - todo_wine ok(hr == S_OK, "got %08x\n", hr); - todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - todo_wine ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + todo_wine ok(hr == S_OK, "got %08lx\n", hr); + todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + todo_wine ok(dst_len == sizeof(dst), "got %Id\n", dst_len); todo_wine test_numeric_val(&dst, &result4);
dst_len = 0x1234; @@ -4099,17 +4099,17 @@ static void test_converttonumeric(void) memset(dst.val, 0xfe, sizeof(dst.val)); V_VT(&var) = VT_NULL; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_NUMERIC, sizeof(var), &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 10, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status);
dst_len = 0x1234; dst.scale = 30; dst.sign = 0; memset(dst.val, 0xfe, sizeof(dst.val)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_NUMERIC, sizeof(strW), &dst_len, strW, &dst, sizeof(dst), 0, &dst_status, 10, 0, 0); - todo_wine ok(hr == S_OK, "got %08x\n", hr); - todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - todo_wine ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + todo_wine ok(hr == S_OK, "got %08lx\n", hr); + todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + todo_wine ok(dst_len == sizeof(dst), "got %Id\n", dst_len); todo_wine test_numeric_val(&dst, &result5);
bstr = SysAllocString(strW); @@ -4119,9 +4119,9 @@ static void test_converttonumeric(void) dst_len = sizeof(strW); memset(dst.val, 0xfe, sizeof(dst.val)); hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_NUMERIC, 0, &dst_len, &bstr, &dst, sizeof(dst), 0, &dst_status, 10, 0, 0); - todo_wine ok(hr == S_OK, "got %08x\n", hr); - todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - todo_wine ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + todo_wine ok(hr == S_OK, "got %08lx\n", hr); + todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + todo_wine ok(dst_len == sizeof(dst), "got %Id\n", dst_len); todo_wine test_numeric_val(&dst, &result5); SysFreeString(bstr);
@@ -4132,9 +4132,9 @@ static void test_converttonumeric(void) dst_len = sizeof(largeW); memset(dst.val, 0xfe, sizeof(dst.val)); hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_NUMERIC, 0, &dst_len, &bstr, &dst, sizeof(dst), 0, &dst_status, 10, 0, 0); - todo_wine ok(hr == S_OK, "got %08x\n", hr); - todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - todo_wine ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + todo_wine ok(hr == S_OK, "got %08lx\n", hr); + todo_wine ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + todo_wine ok(dst_len == sizeof(dst), "got %Id\n", dst_len); todo_wine test_numeric_val(&dst, &result6); SysFreeString(bstr); } @@ -4152,9 +4152,9 @@ static void test_converttodate(void) dst = 0.0; dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_DATE, DBTYPE_DATE, sizeof(date), &dst_len, &date, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 41408.086250, "got %f\n", dst);
VariantInit(&var); @@ -4163,9 +4163,9 @@ static void test_converttodate(void) dst = 0.0; dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DATE, sizeof(var), &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 41408.086250, "got %f\n", dst);
VariantInit(&var); @@ -4174,9 +4174,9 @@ static void test_converttodate(void) dst = 0.0; dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DATE, sizeof(var), &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 41408.086250, "got %f\n", dst);
VariantInit(&var); @@ -4185,9 +4185,9 @@ static void test_converttodate(void) dst = 0.0; dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DATE, sizeof(var), &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 41408.000000, "got %f\n", dst);
V_VT(&var) = VT_BSTR; @@ -4195,9 +4195,9 @@ static void test_converttodate(void) dst = 0.0; dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DATE, sizeof(var), &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 41408.000000, "got %f\n", dst); VariantClear(&var);
@@ -4205,9 +4205,9 @@ static void test_converttodate(void) dst_len = 0; bstr = SysAllocString(strW); hr = IDataConvert_DataConvert(convert, DBTYPE_BSTR, DBTYPE_DATE, 0, &dst_len, &bstr, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 41408.000000, "got %f\n", dst); SysFreeString(bstr);
@@ -4215,18 +4215,18 @@ static void test_converttodate(void) dst = 1.0; dst_len = 0; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DATE, sizeof(var), &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08lx\n", dst_status); + ok(dst_len == sizeof(dst), "got %Id\n", dst_len); ok(dst == 0.0, "got %f\n", dst);
V_VT(&var) = VT_NULL; dst = 1.0; dst_len = 0xdeadbeef; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_DATE, sizeof(var), &dst_len, &var, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status); - ok(dst_len == 0xdeadbeef, "got %ld\n", dst_len); + ok(hr == S_OK, "got %08lx\n", hr); + ok(dst_status == DBSTATUS_S_ISNULL, "got %08lx\n", dst_status); + ok(dst_len == 0xdeadbeef, "got %Id\n", dst_len); ok(dst == 1.0, "got %f\n", dst); }
@@ -4241,7 +4241,7 @@ START_TEST(convert) hr = CoCreateInstance(&CLSID_OLEDB_CONVERSIONLIBRARY, NULL, CLSCTX_INPROC_SERVER, &IID_IDataConvert, (void**)&convert); if(FAILED(hr)) { - win_skip("Unable to create IDataConvert instance, 0x%08x\n", hr); + win_skip("Unable to create IDataConvert instance, 0x%08lx\n", hr); OleUninitialize(); return; } diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c index c3551d085f1..5d99aef7a89 100644 --- a/dlls/oledb32/tests/database.c +++ b/dlls/oledb32/tests/database.c @@ -46,7 +46,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__, line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__, line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
static void test_GetDataSource(WCHAR *initstring) @@ -58,7 +58,7 @@ static void test_GetDataSource(WCHAR *initstring) trace("Data Source: %s\n", wine_dbgstr_w(initstring));
hr = CoCreateInstance(&CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER, &IID_IDataInitialize,(void**)&datainit); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
EXPECT_REF(datainit, 1);
@@ -72,7 +72,7 @@ static void test_GetDataSource(WCHAR *initstring) EXPECT_REF(dbinit, 1);
hr = IDBInitialize_QueryInterface(dbinit, &IID_IDBProperties, (void**)&props); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if(SUCCEEDED(hr)) { ULONG cnt; @@ -82,13 +82,13 @@ static void test_GetDataSource(WCHAR *initstring) EXPECT_REF(dbinit, 2); EXPECT_REF(props, 2); hr = IDBProperties_GetPropertyInfo(props, 0, NULL, &cnt, &pInfoset, &ary); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if(hr == S_OK) { ULONG i; for(i =0; i < pInfoset->cPropertyInfos; i++) { - trace("(0x%04x) '%s' %d\n", pInfoset->rgPropertyInfos[i].dwPropertyID, wine_dbgstr_w(pInfoset->rgPropertyInfos[i].pwszDescription), + trace("(0x%04lx) '%s' %d\n", pInfoset->rgPropertyInfos[i].dwPropertyID, wine_dbgstr_w(pInfoset->rgPropertyInfos[i].pwszDescription), pInfoset->rgPropertyInfos[i].vtType); }
@@ -147,20 +147,20 @@ static HRESULT WINAPI dbprops_GetPropertyInfo(IDBProperties *iface, ULONG cPrope
static HRESULT WINAPI dbprops_SetProperties(IDBProperties *iface, ULONG set_count, DBPROPSET propsets[]) { - ok(set_count == 1, "got %u\n", set_count); + ok(set_count == 1, "got %lu\n", set_count);
ok(IsEqualIID(&propsets->guidPropertySet, &DBPROPSET_DBINIT), "set guid %s\n", wine_dbgstr_guid(&propsets->guidPropertySet)); - ok(propsets->cProperties == 2, "got propcount %u\n", propsets->cProperties); + ok(propsets->cProperties == 2, "got propcount %lu\n", propsets->cProperties);
if (propsets->cProperties == 2) { - ok(propsets->rgProperties[0].dwPropertyID == DBPROP_INIT_DATASOURCE, "got propid[0] %u\n", propsets->rgProperties[0].dwPropertyID); - ok(propsets->rgProperties[0].dwOptions == DBPROPOPTIONS_REQUIRED, "got options[0] %u\n", propsets->rgProperties[0].dwOptions); - ok(propsets->rgProperties[0].dwStatus == 0, "got status[0] %u\n", propsets->rgProperties[0].dwStatus); + ok(propsets->rgProperties[0].dwPropertyID == DBPROP_INIT_DATASOURCE, "got propid[0] %lu\n", propsets->rgProperties[0].dwPropertyID); + ok(propsets->rgProperties[0].dwOptions == DBPROPOPTIONS_REQUIRED, "got options[0] %lu\n", propsets->rgProperties[0].dwOptions); + ok(propsets->rgProperties[0].dwStatus == 0, "got status[0] %lu\n", propsets->rgProperties[0].dwStatus); ok(V_VT(&propsets->rgProperties[0].vValue) == VT_BSTR, "got vartype[0] %u\n", V_VT(&propsets->rgProperties[0].vValue));
- ok(propsets->rgProperties[1].dwPropertyID == DBPROP_INIT_PROVIDERSTRING, "got propid[1] %u\n", propsets->rgProperties[1].dwPropertyID); - ok(propsets->rgProperties[1].dwOptions == DBPROPOPTIONS_REQUIRED, "got options[1] %u\n", propsets->rgProperties[1].dwOptions); - ok(propsets->rgProperties[1].dwStatus == 0, "got status[1] %u\n", propsets->rgProperties[1].dwStatus); + ok(propsets->rgProperties[1].dwPropertyID == DBPROP_INIT_PROVIDERSTRING, "got propid[1] %lu\n", propsets->rgProperties[1].dwPropertyID); + ok(propsets->rgProperties[1].dwOptions == DBPROPOPTIONS_REQUIRED, "got options[1] %lu\n", propsets->rgProperties[1].dwOptions); + ok(propsets->rgProperties[1].dwStatus == 0, "got status[1] %lu\n", propsets->rgProperties[1].dwStatus); ok(V_VT(&propsets->rgProperties[1].vValue) == VT_BSTR, "got vartype[1] %u\n", V_VT(&propsets->rgProperties[1].vValue)); } return S_OK; @@ -275,11 +275,11 @@ static void test_GetDataSource2(WCHAR *initstring) HRESULT hr;
hr = CoCreateInstance(&CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER, &IID_IDataInitialize,(void**)&datainit); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
dbinit = &dbinittest; hr = IDataInitialize_GetDataSource(datainit, NULL, CLSCTX_INPROC_SERVER, initstring, &IID_IDBInitialize, (IUnknown**)&dbinit); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
IDataInitialize_Release(datainit); } @@ -345,74 +345,74 @@ static void test_errorinfo(void) BSTR str;
hr = CoCreateInstance(&CSLID_MSDAER, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IErrorInfo, (void**)&errorinfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IErrorInfo_GetGUID(errorinfo, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = IErrorInfo_GetSource(errorinfo, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = IErrorInfo_GetDescription(errorinfo, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = IErrorInfo_GetHelpFile(errorinfo, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = IErrorInfo_GetHelpContext(errorinfo, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
memset(&guid, 0xac, sizeof(guid)); hr = IErrorInfo_GetGUID(errorinfo, &guid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&guid, &GUID_NULL), "got wrong guid\n");
str = (BSTR)0x1; hr = IErrorInfo_GetSource(errorinfo, &str); - ok(hr == E_FAIL, "got %08x\n", hr); + ok(hr == E_FAIL, "got %08lx\n", hr); ok(str == NULL, "got %s\n", wine_dbgstr_w(str));
str = (BSTR)0x1; hr = IErrorInfo_GetDescription(errorinfo, &str); - ok(hr == E_FAIL, "got %08x\n", hr); + ok(hr == E_FAIL, "got %08lx\n", hr); ok(str == NULL, "got %s\n", wine_dbgstr_w(str));
str = (BSTR)0x1; hr = IErrorInfo_GetHelpFile(errorinfo, &str); - ok(hr == E_FAIL, "got %08x\n", hr); + ok(hr == E_FAIL, "got %08lx\n", hr); ok(str == NULL, "got %s\n", wine_dbgstr_w(str));
context = 1; hr = IErrorInfo_GetHelpContext(errorinfo, &context); - ok(hr == E_FAIL, "got %08x\n", hr); - ok(context == 0, "got %d\n", context); + ok(hr == E_FAIL, "got %08lx\n", hr); + ok(context == 0, "got %ld\n", context);
IErrorInfo_Release(errorinfo);
hr = IErrorInfo_QueryInterface(errorinfo, &IID_ICreateErrorInfo, (void**)&createerror); - ok(hr == E_NOINTERFACE, "got %08x\n", hr); + ok(hr == E_NOINTERFACE, "got %08lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IErrorRecords, (void**)&errrecs); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IErrorRecords_GetRecordCount(errrecs, &cnt); - ok(hr == S_OK, "got %08x\n", hr); - ok(cnt == 0, "Got unexpected record count %u\n", cnt); + ok(hr == S_OK, "got %08lx\n", hr); + ok(cnt == 0, "Got unexpected record count %lu\n", cnt);
hr = IErrorRecords_GetBasicErrorInfo(errrecs, 0, &info3); - ok(hr == DB_E_BADRECORDNUM, "got %08x\n", hr); + ok(hr == DB_E_BADRECORDNUM, "got %08lx\n", hr);
hr = IErrorRecords_GetCustomErrorObject(errrecs, 0, &IID_IUnknown, &unk2); - ok(hr == DB_E_BADRECORDNUM, "got %08x\n", hr); + ok(hr == DB_E_BADRECORDNUM, "got %08lx\n", hr);
hr = IErrorRecords_GetErrorInfo(errrecs, 0, 0, &errorinfo2); - ok(hr == DB_E_BADRECORDNUM, "got %08x\n", hr); + ok(hr == DB_E_BADRECORDNUM, "got %08lx\n", hr);
hr = IErrorRecords_GetErrorParameters(errrecs, 0, &dispparams); - ok(hr == DB_E_BADRECORDNUM, "got %08x\n", hr); + ok(hr == DB_E_BADRECORDNUM, "got %08lx\n", hr);
memset(&info, 0, sizeof(ERRORINFO)); info.dwMinor = 1; @@ -421,44 +421,44 @@ static void test_errorinfo(void) memset(&info3, 0, sizeof(ERRORINFO));
hr = IErrorRecords_AddErrorRecord(errrecs, NULL, 268435456, NULL, NULL, 0); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = IErrorRecords_AddErrorRecord(errrecs, &info, 1, NULL, NULL, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IErrorRecords_GetRecordCount(errrecs, &cnt); - ok(hr == S_OK, "got %08x\n", hr); - ok(cnt == 1, "expected 1 got %d\n", cnt); + ok(hr == S_OK, "got %08lx\n", hr); + ok(cnt == 1, "expected 1 got %ld\n", cnt);
/* Record does not contain custom error object. */ unk2 = (void*)0xdeadbeef; hr = IErrorRecords_GetCustomErrorObject(errrecs, 0, &IID_IUnknown, &unk2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(unk2 == NULL, "Got custom object %p.\n", unk2);
hr = IErrorRecords_AddErrorRecord(errrecs, &info2, 2, NULL, NULL, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IErrorRecords_GetRecordCount(errrecs, &cnt); - ok(hr == S_OK, "got %08x\n", hr); - ok(cnt == 2, "expected 2 got %d\n", cnt); + ok(hr == S_OK, "got %08lx\n", hr); + ok(cnt == 2, "expected 2 got %ld\n", cnt);
hr = IErrorRecords_GetBasicErrorInfo(errrecs, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = IErrorRecords_GetBasicErrorInfo(errrecs, 100, &info3); - ok(hr == DB_E_BADRECORDNUM, "got %08x\n", hr); + ok(hr == DB_E_BADRECORDNUM, "got %08lx\n", hr);
hr = IErrorRecords_GetBasicErrorInfo(errrecs, 0, &info3); - ok(hr == S_OK, "got %08x\n", hr); - ok(info3.dwMinor == 2, "expected 2 got %d\n", info3.dwMinor); + ok(hr == S_OK, "got %08lx\n", hr); + ok(info3.dwMinor == 2, "expected 2 got %ld\n", info3.dwMinor);
hr = IErrorRecords_GetErrorParameters(errrecs, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
memset(&dispparams, 0xcc, sizeof(dispparams)); hr = IErrorRecords_GetErrorParameters(errrecs, 0, &dispparams); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(dispparams.rgvarg == NULL, "Got arguments %p\n", dispparams.rgvarg); ok(dispparams.rgdispidNamedArgs == NULL, "Got named arguments %p\n", dispparams.rgdispidNamedArgs); ok(dispparams.cArgs == 0, "Got argument count %u\n", dispparams.cArgs); @@ -473,23 +473,23 @@ static void test_errorinfo(void) dispparams.rgdispidNamedArgs = &dispid; dispparams.cNamedArgs = 1; hr = IErrorRecords_AddErrorRecord(errrecs, &info2, 0, &dispparams, NULL, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
memset(&dispparams, 0, sizeof(dispparams)); hr = IErrorRecords_GetErrorParameters(errrecs, 0, &dispparams); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(V_VT(&dispparams.rgvarg[0]) == VT_BSTR, "Got arg type %d\n", V_VT(&dispparams.rgvarg[0])); ok(V_BSTR(&dispparams.rgvarg[0]) != V_BSTR(&arg), "Got arg bstr %d\n", V_VT(&dispparams.rgvarg[0]));
- ok(dispparams.rgdispidNamedArgs[0] == 0x123, "Got named argument %d\n", dispparams.rgdispidNamedArgs[0]); + ok(dispparams.rgdispidNamedArgs[0] == 0x123, "Got named argument %ld\n", dispparams.rgdispidNamedArgs[0]); ok(dispparams.cArgs == 1, "Got argument count %u\n", dispparams.cArgs); ok(dispparams.cNamedArgs == 1, "Got named argument count %u\n", dispparams.cNamedArgs);
EXPECT_REF(errrecs, 2); EXPECT_REF(errorinfo, 2); hr = IErrorRecords_GetErrorInfo(errrecs, 0, 0, &errorinfo2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(errorinfo == errorinfo2, "different object\n"); EXPECT_REF(errorinfo, 3); IErrorInfo_Release(errorinfo2); @@ -524,7 +524,7 @@ static void test_initializationstring(void) WCHAR *initstring = NULL;
hr = CoCreateInstance(&CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER, &IID_IDataInitialize,(void**)&datainit); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if(SUCCEEDED(hr)) { EXPECT_REF(datainit, 1); @@ -538,7 +538,7 @@ static void test_initializationstring(void) EXPECT_REF(dbinit, 1);
hr = IDataInitialize_GetInitializationString(datainit, (IUnknown*)dbinit, 0, &initstring); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if(hr == S_OK) { trace("Init String: %s\n", wine_dbgstr_w(initstring)); @@ -553,24 +553,24 @@ static void test_initializationstring(void) dbinit = NULL; hr = IDataInitialize_GetDataSource(datainit, NULL, CLSCTX_INPROC_SERVER, (WCHAR*)initstring_msdasql2, &IID_IDBInitialize, (IUnknown**)&dbinit); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDBInitialize_Release(dbinit);
/* Invalid Mode value */ dbinit = NULL; hr = IDataInitialize_GetDataSource(datainit, NULL, CLSCTX_INPROC_SERVER, (WCHAR *)initstring_mode, &IID_IDBInitialize, (IUnknown **)&dbinit); - ok(FAILED(hr), "got 0x%08x\n", hr); + ok(FAILED(hr), "got 0x%08lx\n", hr);
dbinit = NULL; hr = IDataInitialize_GetDataSource(datainit, NULL, CLSCTX_INPROC_SERVER, (WCHAR *)initstring_mode2, &IID_IDBInitialize, (IUnknown **)&dbinit); - ok(FAILED(hr), "got 0x%08x\n", hr); + ok(FAILED(hr), "got 0x%08lx\n", hr);
dbinit = NULL; hr = IDataInitialize_GetDataSource(datainit, NULL, CLSCTX_INPROC_SERVER, (WCHAR *)initstring_mode3, &IID_IDBInitialize, (IUnknown **)&dbinit); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDBInitialize_Release(dbinit); } else @@ -590,24 +590,24 @@ static void test_rowposition(void) IID iid;
hr = CoCreateInstance(&CLSID_OLEDB_ROWPOSITIONLIBRARY, NULL, CLSCTX_INPROC_SERVER, &IID_IRowPosition, (void**)&rowpos); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IRowPosition_QueryInterface(rowpos, &IID_IConnectionPointContainer, (void**)&cpc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IConnectionPointContainer_EnumConnectionPoints(cpc, &enum_points); todo_wine - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { hr = IEnumConnectionPoints_Next(enum_points, 1, &cp, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IConnectionPoint_GetConnectionInterface(cp, &iid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualIID(&iid, &IID_IRowPositionChange), "got %s\n", wine_dbgstr_guid(&iid)); IConnectionPoint_Release(cp);
hr = IEnumConnectionPoints_Next(enum_points, 1, &cp, NULL); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
IEnumConnectionPoints_Release(enum_points); } @@ -654,7 +654,7 @@ static ULONG WINAPI rset_Release(IRowset *iface) static HRESULT WINAPI rset_AddRefRows(IRowset *iface, DBCOUNTITEM cRows, const HROW rghRows[], DBREFCOUNT rgRefCounts[], DBROWSTATUS rgRowStatus[]) { - trace("AddRefRows: %ld\n", rghRows[0]); + trace("AddRefRows: %Id\n", rghRows[0]); return S_OK; }
@@ -739,11 +739,11 @@ static void test_rowpos_initialize(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_OLEDB_ROWPOSITIONLIBRARY, NULL, CLSCTX_INPROC_SERVER, &IID_IRowPosition, (void**)&rowpos); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
init_test_rset(); hr = IRowPosition_Initialize(rowpos, (IUnknown*)&test_rset.IRowset_iface); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
IRowPosition_Release(rowpos); } @@ -773,7 +773,7 @@ static ULONG WINAPI onchange_Release(IRowPositionChange *iface) static HRESULT WINAPI onchange_OnRowPositionChange(IRowPositionChange *iface, DBREASON reason, DBEVENTPHASE phase, BOOL cant_deny) { - trace("%d %d %d\n", reason, phase, cant_deny); + trace("%ld %ld %d\n", reason, phase, cant_deny); return S_OK; }
@@ -794,11 +794,11 @@ static void init_onchange_sink(IRowPosition *rowpos) HRESULT hr;
hr = IRowPosition_QueryInterface(rowpos, &IID_IConnectionPointContainer, (void**)&cpc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IConnectionPointContainer_FindConnectionPoint(cpc, &IID_IRowPositionChange, &cp); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = IConnectionPoint_Advise(cp, (IUnknown*)&onchangesink, &cookie); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); IConnectionPoint_Release(cp); IConnectionPointContainer_Release(cpc); } @@ -813,51 +813,51 @@ static void test_rowpos_clearrowposition(void) HROW row;
hr = CoCreateInstance(&CLSID_OLEDB_ROWPOSITIONLIBRARY, NULL, CLSCTX_INPROC_SERVER, &IID_IRowPosition, (void**)&rowpos); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IRowPosition_ClearRowPosition(rowpos); - ok(hr == E_UNEXPECTED, "got %08x\n", hr); + ok(hr == E_UNEXPECTED, "got %08lx\n", hr);
hr = IRowPosition_GetRowset(rowpos, &IID_IStream, &unk); - ok(hr == E_UNEXPECTED, "got %08x\n", hr); + ok(hr == E_UNEXPECTED, "got %08lx\n", hr);
chapter = 1; row = 1; flags = DBPOSITION_OK; hr = IRowPosition_GetRowPosition(rowpos, &chapter, &row, &flags); - ok(hr == E_UNEXPECTED, "got %08x\n", hr); - ok(chapter == DB_NULL_HCHAPTER, "got %ld\n", chapter); - ok(row == DB_NULL_HROW, "got %ld\n", row); - ok(flags == DBPOSITION_NOROW, "got %d\n", flags); + ok(hr == E_UNEXPECTED, "got %08lx\n", hr); + ok(chapter == DB_NULL_HCHAPTER, "got %Id\n", chapter); + ok(row == DB_NULL_HROW, "got %Id\n", row); + ok(flags == DBPOSITION_NOROW, "got %ld\n", flags);
init_test_rset(); hr = IRowPosition_Initialize(rowpos, (IUnknown*)&test_rset.IRowset_iface); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
chapter = 1; row = 1; flags = DBPOSITION_OK; hr = IRowPosition_GetRowPosition(rowpos, &chapter, &row, &flags); - ok(hr == S_OK, "got %08x\n", hr); - ok(chapter == DB_NULL_HCHAPTER, "got %ld\n", chapter); - ok(row == DB_NULL_HROW, "got %ld\n", row); - ok(flags == DBPOSITION_NOROW, "got %d\n", flags); + ok(hr == S_OK, "got %08lx\n", hr); + ok(chapter == DB_NULL_HCHAPTER, "got %Id\n", chapter); + ok(row == DB_NULL_HROW, "got %Id\n", row); + ok(flags == DBPOSITION_NOROW, "got %ld\n", flags);
hr = IRowPosition_GetRowset(rowpos, &IID_IRowset, &unk); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
init_onchange_sink(rowpos); hr = IRowPosition_ClearRowPosition(rowpos); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
chapter = 1; row = 1; flags = DBPOSITION_OK; hr = IRowPosition_GetRowPosition(rowpos, &chapter, &row, &flags); - ok(hr == S_OK, "got %08x\n", hr); - ok(chapter == DB_NULL_HCHAPTER, "got %ld\n", chapter); - ok(row == DB_NULL_HROW, "got %ld\n", row); - ok(flags == DBPOSITION_NOROW, "got %d\n", flags); + ok(hr == S_OK, "got %08lx\n", hr); + ok(chapter == DB_NULL_HCHAPTER, "got %Id\n", chapter); + ok(row == DB_NULL_HROW, "got %Id\n", row); + ok(flags == DBPOSITION_NOROW, "got %ld\n", flags);
IRowPosition_Release(rowpos); } @@ -868,18 +868,18 @@ static void test_rowpos_setrowposition(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_OLEDB_ROWPOSITIONLIBRARY, NULL, CLSCTX_INPROC_SERVER, &IID_IRowPosition, (void**)&rowpos); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
init_test_rset(); hr = IRowPosition_Initialize(rowpos, (IUnknown*)&test_rset.IRowset_iface); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IRowPosition_ClearRowPosition(rowpos); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
init_onchange_sink(rowpos); hr = IRowPosition_SetRowPosition(rowpos, 0x123, 0x456, DBPOSITION_OK); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
IRowPosition_Release(rowpos); } @@ -890,7 +890,7 @@ static void test_dslocator(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_DataLinks, NULL, CLSCTX_INPROC_SERVER, &IID_IDataSourceLocator,(void**)&dslocator); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if(SUCCEEDED(hr)) { IDataInitialize *datainit, *datainit2; @@ -904,68 +904,68 @@ static void test_dslocator(void) hr = IDataSourceLocator_get_hWnd(dslocator, NULL);
hr = IDataSourceLocator_get_hWnd(dslocator, &hwnd); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(hwnd == 0, "got %p\n", (HWND)hwnd);
hwnd = 0xDEADBEEF; hr = IDataSourceLocator_get_hWnd(dslocator, &hwnd); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(hwnd == 0, "got %p\n", (HWND)hwnd);
hwnd = 0xDEADBEEF; hr = IDataSourceLocator_put_hWnd(dslocator, hwnd); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hwnd = 0; hr = IDataSourceLocator_get_hWnd(dslocator, &hwnd); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(hwnd == 0xDEADBEEF, "got %p\n", (HWND)hwnd);
hwnd = 0; hr = IDataSourceLocator_put_hWnd(dslocator, hwnd); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hwnd = 0xDEADBEEF; hr = IDataSourceLocator_get_hWnd(dslocator, &hwnd); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(hwnd == 0, "got %p\n", (HWND)hwnd);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IDataInitialize, (void **)&datainit); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IDataInitialize, (void **)&datainit2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(datainit == datainit2, "Got %p, previous %p\n", datainit, datainit2);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IRunnableObject, (void **)&runable); - ok(hr == E_NOINTERFACE, "got %08x\n", hr); + ok(hr == E_NOINTERFACE, "got %08lx\n", hr);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IMarshal, (void **)&marshal); - ok(hr == E_NOINTERFACE, "got %08x\n", hr); + ok(hr == E_NOINTERFACE, "got %08lx\n", hr);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IProvideClassInfo, (void **)&info); - ok(hr == E_NOINTERFACE, "got %08x\n", hr); + ok(hr == E_NOINTERFACE, "got %08lx\n", hr);
hr = IDataSourceLocator_QueryInterface(dslocator, &IID_IRpcOptions, (void **)&opts); - ok(hr == E_NOINTERFACE, "got %08x\n", hr); + ok(hr == E_NOINTERFACE, "got %08lx\n", hr);
if (winetest_interactive) { IDispatch *disp = NULL;
hr = IDataSourceLocator_PromptNew(dslocator, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = IDataSourceLocator_PromptNew(dslocator, &disp); if (hr == S_OK) { - ok(disp != NULL, "got %08x\n", hr); + ok(disp != NULL, "got %08lx\n", hr); IDispatch_Release(disp); } else { - ok(hr == S_FALSE, "got %08x\n", hr); - ok(!disp, "got %08x\n", hr); + ok(hr == S_FALSE, "got %08lx\n", hr); + ok(!disp, "got %08lx\n", hr); } }
@@ -994,7 +994,7 @@ static void test_odbc_provider(void) };
hr = CoCreateInstance( &CLSID_MSDASQL, NULL, CLSCTX_ALL, &IID_IDBProperties, (void **)&props); - ok(hr == S_OK, "Failed to create object 0x%08x\n", hr); + ok(hr == S_OK, "Failed to create object 0x%08lx\n", hr); if (FAILED(hr)) { return; @@ -1006,7 +1006,7 @@ static void test_odbc_provider(void)
infocount = 0; hr = IDBProperties_GetPropertyInfo(props, 1, &propidset, &infocount, &propinfoset, &desc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { ULONG i; @@ -1016,7 +1016,7 @@ static void test_odbc_provider(void)
ok(IsEqualGUID(&propinfoset->guidPropertySet, &DBPROPSET_DBINIT), "got %s\n", debugstr_guid(&propinfoset->guidPropertySet)); - ok(propinfoset->cPropertyInfos == 14, "got %d\n", propinfoset->cPropertyInfos); + ok(propinfoset->cPropertyInfos == 14, "got %ld\n", propinfoset->cPropertyInfos);
propidlist.guidPropertySet = DBPROPSET_DBINIT; propidlist.cPropertyIDs = propinfoset->cPropertyInfos; @@ -1024,9 +1024,9 @@ static void test_odbc_provider(void)
for (i = 0; i < propinfoset->cPropertyInfos; i++) { - ok(properties[i] == propinfoset->rgPropertyInfos[i].dwPropertyID, "%d, got %d\n", i, + ok(properties[i] == propinfoset->rgPropertyInfos[i].dwPropertyID, "%ld, got %ld\n", i, propinfoset->rgPropertyInfos[i].dwPropertyID); - ok(propinfoset->rgPropertyInfos[i].vtType != VT_EMPTY, "%d, got %d\n", i, + ok(propinfoset->rgPropertyInfos[i].vtType != VT_EMPTY, "%ld, got %d\n", i, propinfoset->rgPropertyInfos[i].vtType);
propidlist.rgPropertyIDs[i] = propinfoset->rgPropertyInfos[i].dwPropertyID; @@ -1039,12 +1039,12 @@ static void test_odbc_provider(void) CoTaskMemFree(propinfoset);
hr = IDBProperties_GetProperties(props, 1, &propidlist, &propcnt, &propset); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(propidlist.cPropertyIDs == 14, "got %d\n", propinfoset->cPropertyInfos); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(propidlist.cPropertyIDs == 14, "got %ld\n", propinfoset->cPropertyInfos);
for (i = 0; i < propidlist.cPropertyIDs; i++) { - ok(properties[i] == propidlist.rgPropertyIDs[i], "%d, got %d\n", i, + ok(properties[i] == propidlist.rgPropertyIDs[i], "%ld, got %ld\n", i, propidlist.rgPropertyIDs[i]);
propidlist.rgPropertyIDs[i] = propinfoset->rgPropertyInfos[i].dwPropertyID; @@ -1064,26 +1064,26 @@ static void test_odbc_enumerator(void) IRowset *rowset;
hr = CoCreateInstance( &CLSID_MSDASQL_ENUMERATOR, NULL, CLSCTX_ALL, &IID_ISourcesRowset, (void **)&source); - ok(hr == S_OK, "Failed to create object 0x%08x\n", hr); + ok(hr == S_OK, "Failed to create object 0x%08lx\n", hr); if (FAILED(hr)) { return; }
hr = ISourcesRowset_GetSourcesRowset(source, NULL, &IID_IRowset, 0, 0, (IUnknown**)&rowset); - ok(hr == S_OK, "Failed to create object 0x%08x\n", hr); + ok(hr == S_OK, "Failed to create object 0x%08lx\n", hr); if (hr == S_OK) { IAccessor *accessor; IRowsetInfo *info;
hr = IRowset_QueryInterface(rowset, &IID_IAccessor, (void **)&accessor); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); if (hr == S_OK) IAccessor_Release(accessor);
hr = IRowset_QueryInterface(rowset, &IID_IRowsetInfo, (void **)&info); - todo_wine ok(hr == S_OK, "got %08x\n", hr); + todo_wine ok(hr == S_OK, "got %08lx\n", hr); if (hr == S_OK) IRowsetInfo_Release(info);
diff --git a/dlls/oledb32/tests/marshal.c b/dlls/oledb32/tests/marshal.c index b1540b49972..747995cfe67 100644 --- a/dlls/oledb32/tests/marshal.c +++ b/dlls/oledb32/tests/marshal.c @@ -34,7 +34,7 @@
#define RELEASEMARSHALDATA WM_USER
-#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr)
struct host_object_data { @@ -118,7 +118,7 @@ static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, M static void end_host_object(DWORD tid, HANDLE thread) { BOOL ret = PostThreadMessageW(tid, WM_QUIT, 0, 0); - ok(ret, "PostThreadMessageW failed with error %d\n", GetLastError()); + ok(ret, "PostThreadMessageW failed with error %ld\n", GetLastError()); /* be careful of races - don't return until hosting thread has terminated */ ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); CloseHandle(thread); @@ -163,8 +163,8 @@ static HRESULT WINAPI Test_DBProperties_GetProperties( ULONG *pcPropertySets, DBPROPSET **prgPropertySets) { - ok(cPropertyIDSets == 0, "Expected cPropertyIDSets to be 0 instead of %d\n", cPropertyIDSets); - ok(*pcPropertySets == 0, "Expected *pcPropertySets to be 0 instead of %d\n", *pcPropertySets); + ok(cPropertyIDSets == 0, "Expected cPropertyIDSets to be 0 instead of %ld\n", cPropertyIDSets); + ok(*pcPropertySets == 0, "Expected *pcPropertySets to be 0 instead of %ld\n", *pcPropertySets); *pcPropertySets = 1; *prgPropertySets = CoTaskMemAlloc(sizeof(DBPROPSET)); (*prgPropertySets)[0].rgProperties = CoTaskMemAlloc(sizeof(DBPROP)); @@ -241,20 +241,20 @@ static void test_IDBProperties(void)
propset_count = 1; hr = IDBProperties_GetProperties(pProxy, 0, NULL, &propset_count, &propsets); - ok(hr == S_OK, "IDBProperties_GetProperties failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IDBProperties_GetProperties failed with error 0x%08lx\n", hr);
- ok(propset_count == 1, "Expected propset_count of 1 but got %d\n", propset_count); - ok(propsets->rgProperties[0].dwPropertyID == TEST_PROPID, "Expected property ID of 0x%x, but got 0x%x\n", TEST_PROPID, propsets->rgProperties[0].dwPropertyID); - ok(propsets->rgProperties[0].dwOptions == DBPROPOPTIONS_REQUIRED, "Expected property options of 0x%x, but got 0x%x\n", DBPROPOPTIONS_REQUIRED, propsets->rgProperties[0].dwOptions); - ok(propsets->rgProperties[0].dwStatus == S_OK, "Expected property options of 0x%x, but got 0x%x\n", S_OK, propsets->rgProperties[0].dwStatus); - ok(propsets->rgProperties[0].colid.eKind == DBKIND_GUID_NAME, "Expected property colid kind of DBKIND_GUID_NAME, but got %d\n", propsets->rgProperties[0].colid.eKind); + ok(propset_count == 1, "Expected propset_count of 1 but got %ld\n", propset_count); + ok(propsets->rgProperties[0].dwPropertyID == TEST_PROPID, "Expected property ID of 0x%x, but got 0x%lx\n", TEST_PROPID, propsets->rgProperties[0].dwPropertyID); + ok(propsets->rgProperties[0].dwOptions == DBPROPOPTIONS_REQUIRED, "Expected property options of 0x%x, but got 0x%lx\n", DBPROPOPTIONS_REQUIRED, propsets->rgProperties[0].dwOptions); + ok(propsets->rgProperties[0].dwStatus == S_OK, "Expected property options of 0x%lx, but got 0x%lx\n", S_OK, propsets->rgProperties[0].dwStatus); + ok(propsets->rgProperties[0].colid.eKind == DBKIND_GUID_NAME, "Expected property colid kind of DBKIND_GUID_NAME, but got %ld\n", propsets->rgProperties[0].colid.eKind); /* colid contents */ ok(IsEqualGUID(&propsets->rgProperties[0].colid.uGuid.guid, &IID_IDBProperties), "Unexpected property colid guid\n"); ok(!lstrcmpW(propsets->rgProperties[0].colid.uName.pwszName, wszDBPropertyColumnName), "Unexpected property colid name\n"); /* vValue contents */ ok(V_VT(&propsets->rgProperties[0].vValue) == VT_BSTR, "Expected property value vt of VT_BSTR, but got %d\n", V_VT(&propsets->rgProperties[0].vValue)); ok(!lstrcmpW(V_BSTR(&propsets->rgProperties[0].vValue), wszDBPropertyTestString), "Unexpected property value string\n"); - ok(propsets->cProperties == 1, "Expected property count of 1 but got %d\n", propsets->cProperties); + ok(propsets->cProperties == 1, "Expected property count of 1 but got %ld\n", propsets->cProperties); ok(IsEqualGUID(&propsets->guidPropertySet, &IID_IDBProperties), "Unexpected guid for property set\n");
IDBProperties_Release(pProxy);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oledlg/tests/Makefile.in | 1 - dlls/oledlg/tests/main.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/oledlg/tests/Makefile.in b/dlls/oledlg/tests/Makefile.in index 10f77e8042e..5c6227bb59d 100644 --- a/dlls/oledlg/tests/Makefile.in +++ b/dlls/oledlg/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = oledlg.dll IMPORTS = oledlg ole32 user32
diff --git a/dlls/oledlg/tests/main.c b/dlls/oledlg/tests/main.c index 919cd008542..384b7b38626 100644 --- a/dlls/oledlg/tests/main.c +++ b/dlls/oledlg/tests/main.c @@ -51,7 +51,7 @@ static ULONG WINAPI enumverbs_Release(IEnumOLEVERB *iface) static int g_enumpos; static HRESULT WINAPI enumverbs_Next(IEnumOLEVERB *iface, ULONG count, OLEVERB *verbs, ULONG *fetched) { - ok(count == 1, "got %u\n", count); + ok(count == 1, "got %lu\n", count); ok(fetched == NULL, "got %p\n", fetched); ok(g_enumpos == 0 || g_enumpos == 1, "got pos %d\n", g_enumpos);
@@ -209,7 +209,7 @@ static HRESULT WINAPI oleobject_GetUserClassID(IOleObject *iface, CLSID *clsid) static HRESULT WINAPI oleobject_GetUserType(IOleObject *iface, DWORD formoftype, LPOLESTR *usertype) { - ok(formoftype == USERCLASSTYPE_SHORT, "got %d\n", formoftype); + ok(formoftype == USERCLASSTYPE_SHORT, "got %ld\n", formoftype); *usertype = CoTaskMemAlloc(sizeof(L"test")); lstrcpyW(*usertype, L"test"); return S_OK;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/opengl32/tests/Makefile.in | 1 dlls/opengl32/tests/opengl.c | 184 ++++++++++++++++++++------------------- 2 files changed, 92 insertions(+), 93 deletions(-)
diff --git a/dlls/opengl32/tests/Makefile.in b/dlls/opengl32/tests/Makefile.in index 222fd4c8654..792c9d0fe78 100644 --- a/dlls/opengl32/tests/Makefile.in +++ b/dlls/opengl32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = opengl32.dll IMPORTS = opengl32 user32 gdi32
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 314fa11225d..8b0e70ccf9c 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -238,7 +238,7 @@ static int test_pfd(const PIXELFORMATDESCRIPTOR *pfd, PIXELFORMATDESCRIPTOR *fmt INT ret; memset(fmt, 0, sizeof(*fmt)); ret = DescribePixelFormat( hdc, pf, sizeof(*fmt), fmt ); - ok(ret, "DescribePixelFormat failed with error: %u\n", GetLastError()); + ok(ret, "DescribePixelFormat failed with error: %lu\n", GetLastError()); } ReleaseDC( hwnd, hdc ); DestroyWindow( hwnd ); @@ -371,7 +371,7 @@ static void test_debug_message_callback(void) count = 0; pglDebugMessageInsertARB(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_OTHER, 0x42424242, GL_DEBUG_SEVERITY_LOW, sizeof(testmsg), testmsg); - ok(count == 1, "expected count == 1, got %u\n", count); + ok(count == 1, "expected count == 1, got %lu\n", count);
glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS); glDisable(GL_DEBUG_OUTPUT); @@ -431,7 +431,7 @@ static void test_setpixelformat(HDC winhdc)
hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "err: %d\n", GetLastError()); + ok(hwnd != NULL, "err: %ld\n", GetLastError()); if (hwnd) { HDC hdc = GetDC( hwnd ); @@ -451,31 +451,31 @@ static void test_setpixelformat(HDC winhdc) SetLastError( 0xdeadbeef ); i = GetPixelFormat( hdc ); ok( i == 0, "GetPixelFormat succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PIXEL_FORMAT, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PIXEL_FORMAT, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); res = SetPixelFormat( hdc, pf, &pfd ); ok( !res, "SetPixelFormat succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); res = DescribePixelFormat( hdc, 0, 0, NULL ); ok( !res, "DescribePixelFormat succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); pf = ChoosePixelFormat( hdc, &pfd ); ok( !pf, "ChoosePixelFormat succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); res = SwapBuffers( hdc ); ok( !res, "SwapBuffers succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); ok( !wglCreateContext( hdc ), "CreateContext succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); }
hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "err: %d\n", GetLastError()); + ok(hwnd != NULL, "err: %ld\n", GetLastError()); if (hwnd) { HDC hdc = GetWindowDC( hwnd ); @@ -571,7 +571,7 @@ static void test_makecurrent(HDC winhdc) ret = wglMakeCurrent( NULL, NULL ); ok( !ret || broken(ret) /* nt4 */, "wglMakeCurrent succeeded\n" ); if (!ret) ok( GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got error=%x\n", GetLastError() ); + "Expected ERROR_INVALID_HANDLE, got error=%lx\n", GetLastError() );
ret = wglMakeCurrent( winhdc, NULL ); ok( ret, "wglMakeCurrent failed\n" ); @@ -588,7 +588,7 @@ static void test_makecurrent(HDC winhdc) ret = wglMakeCurrent( NULL, NULL ); ok( !ret || broken(ret) /* nt4 */, "wglMakeCurrent succeeded\n" ); if (!ret) ok( GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got error=%x\n", GetLastError() ); + "Expected ERROR_INVALID_HANDLE, got error=%lx\n", GetLastError() );
ret = wglMakeCurrent( winhdc, hglrc ); ok( ret, "wglMakeCurrent failed\n" ); @@ -687,13 +687,13 @@ static void test_acceleration(HDC hdc) switch(iAttribRet[0]) { case WGL_NO_ACCELERATION_ARB: - ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == PFD_GENERIC_FORMAT , "Expected only PFD_GENERIC_FORMAT to be set for WGL_NO_ACCELERATION_ARB!: iPixelFormat=%d, dwFlags=%x!\n", iPixelFormat, pfd.dwFlags); + ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == PFD_GENERIC_FORMAT , "Expected only PFD_GENERIC_FORMAT to be set for WGL_NO_ACCELERATION_ARB!: iPixelFormat=%d, dwFlags=%lx!\n", iPixelFormat, pfd.dwFlags); break; case WGL_GENERIC_ACCELERATION_ARB: - ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED), "Expected both PFD_GENERIC_FORMAT and PFD_GENERIC_ACCELERATION to be set for WGL_GENERIC_ACCELERATION_ARB: iPixelFormat=%d, dwFlags=%x!\n", iPixelFormat, pfd.dwFlags); + ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED), "Expected both PFD_GENERIC_FORMAT and PFD_GENERIC_ACCELERATION to be set for WGL_GENERIC_ACCELERATION_ARB: iPixelFormat=%d, dwFlags=%lx!\n", iPixelFormat, pfd.dwFlags); break; case WGL_FULL_ACCELERATION_ARB: - ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == 0, "Expected no PFD_GENERIC_FORMAT/_ACCELERATION to be set for WGL_FULL_ACCELERATION_ARB: iPixelFormat=%d, dwFlags=%x!\n", iPixelFormat, pfd.dwFlags); + ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == 0, "Expected no PFD_GENERIC_FORMAT/_ACCELERATION to be set for WGL_FULL_ACCELERATION_ARB: iPixelFormat=%d, dwFlags=%lx!\n", iPixelFormat, pfd.dwFlags); break; } } @@ -890,7 +890,7 @@ static void test_deletecontext(HWND hwnd, HDC hdc) SetLastError(0xdeadbeef); res = wglDeleteContext(NULL); ok(res == FALSE, "wglDeleteContext succeeded\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected last error to be ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected last error to be ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
if(!hglrc) { @@ -912,14 +912,14 @@ static void test_deletecontext(HWND hwnd, HDC hdc) thread_params.hwnd = hwnd; thread_params.test_finished = CreateEventW(NULL, FALSE, FALSE, NULL); thread_handle = CreateThread(NULL, 0, wgl_thread, &thread_params, 0, &tid); - ok(!!thread_handle, "Failed to create thread, last error %#x.\n", GetLastError()); + ok(!!thread_handle, "Failed to create thread, last error %#lx.\n", GetLastError()); if(thread_handle) { WaitForSingleObject(thread_handle, INFINITE); ok(!thread_params.make_current, "Attempt to make WGL context from another thread passed\n"); ok(thread_params.make_current_error == ERROR_BUSY, "Expected last error to be ERROR_BUSY, got %u\n", thread_params.make_current_error); ok(!thread_params.deleted, "Attempt to delete WGL context from another thread passed\n"); - ok(thread_params.deleted_error == ERROR_BUSY, "Expected last error to be ERROR_BUSY, got %u\n", thread_params.deleted_error); + ok(thread_params.deleted_error == ERROR_BUSY, "Expected last error to be ERROR_BUSY, got %lu\n", thread_params.deleted_error); } CloseHandle(thread_params.test_finished);
@@ -930,7 +930,7 @@ static void test_deletecontext(HWND hwnd, HDC hdc) SetLastError(0xdeadbeef); res = wglDeleteContext(hglrc); ok(res == FALSE, "wglDeleteContext succeeded\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected last error to be ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected last error to be ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
/* WGL makes a context not current when deleting it. This differs from GLX behavior where * deletion takes place when the thread becomes not current. */ @@ -975,12 +975,12 @@ static void test_getprocaddress(HDC hdc) }
func = wglGetProcAddress("glActiveTextureARB"); - ok(func != NULL, "Unable to lookup glActiveTextureARB, last error %#x\n", GetLastError()); + ok(func != NULL, "Unable to lookup glActiveTextureARB, last error %#lx\n", GetLastError());
/* Temporarily disable the context, so we can see that we can't retrieve functions now. */ wglMakeCurrent(hdc, NULL); func = wglGetProcAddress("glActiveTextureARB"); - ok(func == NULL, "Function lookup without a context passed, expected a failure; last error %#x\n", GetLastError()); + ok(func == NULL, "Function lookup without a context passed, expected a failure; last error %#lx\n", GetLastError()); wglMakeCurrent(hdc, ctx); }
@@ -1061,7 +1061,7 @@ static void test_opengl3(HDC hdc) ok(error == ERROR_DC_NOT_FOUND || error == ERROR_INVALID_HANDLE || broken(error == ERROR_DS_GENERIC_ERROR) || broken(error == NVIDIA_HRESULT_FROM_WIN32(ERROR_INVALID_DATA)), /* Nvidia Vista + Win7 */ - "Expected ERROR_DC_NOT_FOUND, got error=%x\n", error); + "Expected ERROR_DC_NOT_FOUND, got error=%lx\n", error); wglDeleteContext(gl3Ctx); }
@@ -1075,7 +1075,7 @@ static void test_opengl3(HDC hdc) error = GetLastError(); /* The Nvidia implementation seems to return hresults instead of win32 error codes */ ok(error == ERROR_INVALID_OPERATION || error == ERROR_INVALID_DATA || - error == NVIDIA_HRESULT_FROM_WIN32(ERROR_INVALID_OPERATION), "Expected ERROR_INVALID_OPERATION, got error=%x\n", error); + error == NVIDIA_HRESULT_FROM_WIN32(ERROR_INVALID_OPERATION), "Expected ERROR_INVALID_OPERATION, got error=%lx\n", error); wglDeleteContext(gl3Ctx); }
@@ -1168,7 +1168,7 @@ static void test_minimized(void)
window = CreateWindowA("static", "opengl32_test", WS_POPUP | WS_MINIMIZE, 0, 0, 640, 480, 0, 0, 0, 0); - ok(!!window, "Failed to create window, last error %#x.\n", GetLastError()); + ok(!!window, "Failed to create window, last error %#lx.\n", GetLastError());
dc = GetDC(window); ok(!!dc, "Failed to get DC.\n"); @@ -1183,25 +1183,25 @@ static void test_minimized(void) }
ret = SetPixelFormat(dc, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set pixel format, last error %#lx.\n", GetLastError());
style = GetWindowLongA(window, GWL_STYLE); - ok(style & WS_MINIMIZE, "Window should be minimized, got style %#x.\n", style); + ok(style & WS_MINIMIZE, "Window should be minimized, got style %#lx.\n", style);
ctx = wglCreateContext(dc); - ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); + ok(!!ctx, "Failed to create GL context, last error %#lx.\n", GetLastError());
ret = wglMakeCurrent(dc, ctx); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
style = GetWindowLongA(window, GWL_STYLE); - ok(style & WS_MINIMIZE, "window should be minimized, got style %#x.\n", style); + ok(style & WS_MINIMIZE, "window should be minimized, got style %#lx.\n", style);
ret = wglMakeCurrent(NULL, NULL); - ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to clear current context, last error %#lx.\n", GetLastError());
ret = wglDeleteContext(ctx); - ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
ReleaseDC(window, dc); DestroyWindow(window); @@ -1237,7 +1237,7 @@ static void test_window_dc(void)
window = CreateWindowA("static", "opengl32_test", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); - ok(!!window, "Failed to create window, last error %#x.\n", GetLastError()); + ok(!!window, "Failed to create window, last error %#lx.\n", GetLastError());
ShowWindow(window, SW_SHOW);
@@ -1254,23 +1254,23 @@ static void test_window_dc(void) }
ret = SetPixelFormat(dc, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set pixel format, last error %#lx.\n", GetLastError());
ctx = wglCreateContext(dc); - ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); + ok(!!ctx, "Failed to create GL context, last error %#lx.\n", GetLastError());
ret = wglMakeCurrent(dc, ctx); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
GetClientRect(window, &r); glGetIntegerv(GL_VIEWPORT, (GLint *)&vp); ok(EqualRect(&r, &vp), "Viewport not equal to client rect.\n");
ret = wglMakeCurrent(NULL, NULL); - ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to clear current context, last error %#lx.\n", GetLastError());
ret = wglDeleteContext(ctx); - ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
ReleaseDC(window, dc); DestroyWindow(window); @@ -1325,13 +1325,13 @@ static void test_message_window(void) }
ret = SetPixelFormat(dc, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set pixel format, last error %#lx.\n", GetLastError());
ctx = wglCreateContext(dc); - ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); + ok(!!ctx, "Failed to create GL context, last error %#lx.\n", GetLastError());
ret = wglMakeCurrent(dc, ctx); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
GetClientRect(window, &r); glGetIntegerv(GL_VIEWPORT, (GLint *)&vp); @@ -1342,13 +1342,13 @@ static void test_message_window(void) glerr = glGetError(); ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); ret = SwapBuffers(dc); - ok(ret, "Failed SwapBuffers, error %#x.\n", GetLastError()); + ok(ret, "Failed SwapBuffers, error %#lx.\n", GetLastError());
ret = wglMakeCurrent(NULL, NULL); - ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to clear current context, last error %#lx.\n", GetLastError());
ret = wglDeleteContext(ctx); - ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
ReleaseDC(window, dc); DestroyWindow(window); @@ -1388,7 +1388,7 @@ static void test_destroy(HDC oldhdc)
window = CreateWindowA("static", "opengl32_test", WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0); - ok(!!window, "Failed to create window, last error %#x.\n", GetLastError()); + ok(!!window, "Failed to create window, last error %#lx.\n", GetLastError());
dc = GetDC(window); ok(!!dc, "Failed to get DC.\n"); @@ -1403,23 +1403,23 @@ static void test_destroy(HDC oldhdc) }
ret = SetPixelFormat(dc, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set pixel format, last error %#lx.\n", GetLastError());
ctx = wglCreateContext(dc); - ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); + ok(!!ctx, "Failed to create GL context, last error %#lx.\n", GetLastError());
ret = wglMakeCurrent(dc, ctx); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
glClear(GL_COLOR_BUFFER_BIT); glFinish(); glerr = glGetError(); ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); ret = SwapBuffers(dc); - ok(ret, "Failed SwapBuffers, error %#x.\n", GetLastError()); + ok(ret, "Failed SwapBuffers, error %#lx.\n", GetLastError());
ret = DestroyWindow(window); - ok(ret, "Failed to destroy window, last error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy window, last error %#lx.\n", GetLastError());
ok(wglGetCurrentContext() == ctx, "Wrong current context.\n");
@@ -1427,11 +1427,11 @@ static void test_destroy(HDC oldhdc) ret = wglMakeCurrent(dc, ctx); err = GetLastError(); ok(!ret && err == ERROR_INVALID_HANDLE, - "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + "Unexpected behavior when making context current, ret %d, last error %#lx.\n", ret, err); SetLastError(0xdeadbeef); ret = SwapBuffers(dc); err = GetLastError(); - ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#x.\n", err); + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#lx.\n", err);
ok(wglGetCurrentContext() == ctx, "Wrong current context.\n");
@@ -1442,10 +1442,10 @@ static void test_destroy(HDC oldhdc) SetLastError(0xdeadbeef); ret = SwapBuffers(dc); err = GetLastError(); - ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#x.\n", err); + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#lx.\n", err);
ret = wglMakeCurrent(NULL, NULL); - ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to clear current context, last error %#lx.\n", GetLastError());
glClear(GL_COLOR_BUFFER_BIT); glFinish(); @@ -1454,35 +1454,35 @@ static void test_destroy(HDC oldhdc) SetLastError(0xdeadbeef); ret = SwapBuffers(dc); err = GetLastError(); - ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#x.\n", err); + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#lx.\n", err);
SetLastError(0xdeadbeef); ret = wglMakeCurrent(dc, ctx); err = GetLastError(); ok(!ret && err == ERROR_INVALID_HANDLE, - "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + "Unexpected behavior when making context current, ret %d, last error %#lx.\n", ret, err);
ok(wglGetCurrentContext() == NULL, "Wrong current context.\n");
ret = wglMakeCurrent(oldhdc, oldctx); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError()); ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n");
SetLastError(0xdeadbeef); ret = wglMakeCurrent(dc, ctx); err = GetLastError(); ok(!ret && err == ERROR_INVALID_HANDLE, - "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + "Unexpected behavior when making context current, ret %d, last error %#lx.\n", ret, err);
ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n");
ret = wglDeleteContext(ctx); - ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
ReleaseDC(window, dc);
ret = wglMakeCurrent(oldhdc, oldctx); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError()); }
static void test_destroy_read(HDC oldhdc) @@ -1519,7 +1519,7 @@ static void test_destroy_read(HDC oldhdc)
draw_window = CreateWindowA("static", "opengl32_test", WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0); - ok(!!draw_window, "Failed to create window, last error %#x.\n", GetLastError()); + ok(!!draw_window, "Failed to create window, last error %#lx.\n", GetLastError());
draw_dc = GetDC(draw_window); ok(!!draw_dc, "Failed to get DC.\n"); @@ -1534,11 +1534,11 @@ static void test_destroy_read(HDC oldhdc) }
ret = SetPixelFormat(draw_dc, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set pixel format, last error %#lx.\n", GetLastError());
read_window = CreateWindowA("static", "opengl32_test", WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0); - ok(!!read_window, "Failed to create window, last error %#x.\n", GetLastError()); + ok(!!read_window, "Failed to create window, last error %#lx.\n", GetLastError());
read_dc = GetDC(read_window); ok(!!draw_dc, "Failed to get DC.\n"); @@ -1555,23 +1555,23 @@ static void test_destroy_read(HDC oldhdc) }
ret = SetPixelFormat(read_dc, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set pixel format, last error %#lx.\n", GetLastError());
ctx = wglCreateContext(draw_dc); - ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); + ok(!!ctx, "Failed to create GL context, last error %#lx.\n", GetLastError());
ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
glCopyPixels(0, 0, 640, 480, GL_COLOR); glFinish(); glerr = glGetError(); ok(glerr == GL_NO_ERROR, "Failed glCopyPixel, error %#x.\n", glerr); ret = SwapBuffers(draw_dc); - ok(ret, "Failed SwapBuffers, error %#x.\n", GetLastError()); + ok(ret, "Failed SwapBuffers, error %#lx.\n", GetLastError());
ret = DestroyWindow(read_window); - ok(ret, "Failed to destroy window, last error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy window, last error %#lx.\n", GetLastError());
ok(wglGetCurrentContext() == ctx, "Wrong current context.\n");
@@ -1588,10 +1588,10 @@ static void test_destroy_read(HDC oldhdc) glerr = glGetError(); ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); ret = SwapBuffers(draw_dc); - ok(ret, "Failed SwapBuffers, error %#x.\n", GetLastError()); + ok(ret, "Failed SwapBuffers, error %#lx.\n", GetLastError());
ret = wglMakeCurrent(NULL, NULL); - ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to clear current context, last error %#lx.\n", GetLastError());
if (0) /* This crashes with Nvidia drivers on Windows. */ { @@ -1599,11 +1599,11 @@ static void test_destroy_read(HDC oldhdc) ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); err = GetLastError(); ok(!ret && err == ERROR_INVALID_HANDLE, - "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + "Unexpected behavior when making context current, ret %d, last error %#lx.\n", ret, err); }
ret = DestroyWindow(draw_window); - ok(ret, "Failed to destroy window, last error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy window, last error %#lx.\n", GetLastError());
glClear(GL_COLOR_BUFFER_BIT); glFinish(); @@ -1612,13 +1612,13 @@ static void test_destroy_read(HDC oldhdc) SetLastError(0xdeadbeef); ret = SwapBuffers(draw_dc); err = GetLastError(); - ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#x.\n", err); + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#lx.\n", err);
SetLastError(0xdeadbeef); ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); err = GetLastError(); ok(!ret && (err == ERROR_INVALID_HANDLE || err == 0xc0070006), - "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + "Unexpected behavior when making context current, ret %d, last error %#lx.\n", ret, err);
ok(wglGetCurrentContext() == NULL, "Wrong current context.\n");
@@ -1631,12 +1631,12 @@ static void test_destroy_read(HDC oldhdc) ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); err = GetLastError(); ok(!ret && (err == ERROR_INVALID_HANDLE || err == 0xc0070006), - "Unexpected behavior when making context current, last error %#x.\n", err); + "Unexpected behavior when making context current, last error %#lx.\n", err);
ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n");
ret = wglDeleteContext(ctx); - ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
ReleaseDC(read_window, read_dc); ReleaseDC(draw_window, draw_dc); @@ -1677,7 +1677,7 @@ static void test_swap_control(HDC oldhdc)
window1 = CreateWindowA("static", "opengl32_test", WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0); - ok(!!window1, "Failed to create window1, last error %#x.\n", GetLastError()); + ok(!!window1, "Failed to create window1, last error %#lx.\n", GetLastError());
dc1 = GetDC(window1); ok(!!dc1, "Failed to get DC.\n"); @@ -1692,29 +1692,29 @@ static void test_swap_control(HDC oldhdc) }
ret = SetPixelFormat(dc1, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set pixel format, last error %#lx.\n", GetLastError());
ctx1 = wglCreateContext(dc1); - ok(!!ctx1, "Failed to create GL context, last error %#x.\n", GetLastError()); + ok(!!ctx1, "Failed to create GL context, last error %#lx.\n", GetLastError());
ret = wglMakeCurrent(dc1, ctx1); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
interval = pwglGetSwapIntervalEXT(); ok(interval == 1, "Expected default swap interval 1, got %d\n", interval);
ret = pwglSwapIntervalEXT(0); - ok(ret, "Failed to set swap interval to 0, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set swap interval to 0, last error %#lx.\n", GetLastError());
interval = pwglGetSwapIntervalEXT(); ok(interval == 0, "Expected swap interval 0, got %d\n", interval);
/* Check what interval we get on a second context on the same drawable.*/ ctx2 = wglCreateContext(dc1); - ok(!!ctx2, "Failed to create GL context, last error %#x.\n", GetLastError()); + ok(!!ctx2, "Failed to create GL context, last error %#lx.\n", GetLastError());
ret = wglMakeCurrent(dc1, ctx2); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
interval = pwglGetSwapIntervalEXT(); ok(interval == 0, "Expected swap interval 0, got %d\n", interval); @@ -1724,16 +1724,16 @@ static void test_swap_control(HDC oldhdc) */ window2 = CreateWindowA("static", "opengl32_test", WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0); - ok(!!window2, "Failed to create window2, last error %#x.\n", GetLastError()); + ok(!!window2, "Failed to create window2, last error %#lx.\n", GetLastError());
dc2 = GetDC(window2); ok(!!dc2, "Failed to get DC.\n");
ret = SetPixelFormat(dc2, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + ok(ret, "Failed to set pixel format, last error %#lx.\n", GetLastError());
ret = wglMakeCurrent(dc2, ctx1); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
/* Since the second window lacks the swap interval, this proves that the interval * is not global or shared among contexts. @@ -1743,18 +1743,18 @@ static void test_swap_control(HDC oldhdc)
/* Test if setting the parent of a window resets the swap interval. */ ret = wglMakeCurrent(dc1, ctx1); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(ret, "Failed to make context current, last error %#lx.\n", GetLastError());
old_parent = SetParent(window1, window2); - ok(!!old_parent, "Failed to make window1 a child of window2, last error %#x.\n", GetLastError()); + ok(!!old_parent, "Failed to make window1 a child of window2, last error %#lx.\n", GetLastError());
interval = pwglGetSwapIntervalEXT(); ok(interval == 0, "Expected swap interval 0, got %d\n", interval);
ret = wglDeleteContext(ctx1); - ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError()); ret = wglDeleteContext(ctx2); - ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
ReleaseDC(window1, dc1); DestroyWindow(window1); @@ -1846,7 +1846,7 @@ START_TEST(opengl)
hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "err: %d\n", GetLastError()); + ok(hwnd != NULL, "err: %ld\n", GetLastError()); if (hwnd) { HDC hdc; @@ -1869,10 +1869,10 @@ START_TEST(opengl) hglrc = wglCreateContext(hdc); ok(hglrc == NULL, "wglCreateContext should fail when no pixel format has been set, but it passed\n"); error = GetLastError(); - ok(error == ERROR_INVALID_PIXEL_FORMAT, "expected ERROR_INVALID_PIXEL_FORMAT for wglCreateContext without a pixelformat set, but received %#x\n", error); + ok(error == ERROR_INVALID_PIXEL_FORMAT, "expected ERROR_INVALID_PIXEL_FORMAT for wglCreateContext without a pixelformat set, but received %#lx\n", error);
res = SetPixelFormat(hdc, iPixelFormat, &pfd); - ok(res, "SetPixelformat failed: %x\n", GetLastError()); + ok(res, "SetPixelformat failed: %lx\n", GetLastError());
test_bitmap_rendering( TRUE ); test_bitmap_rendering( FALSE );
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ntdll/tests/exception.c | 6 +++--- dlls/ntdll/tests/wow64.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 549a05b0ece..a99b1e46b06 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -4095,7 +4095,7 @@ static void test_thread_context(void) expect.SegFs, expect.SegGs, expect.SegSs, expect.EFlags, expect.prev_frame ); trace( "actual: rax=%p rbx=%p rcx=%p rdx=%p rsi=%p rdi=%p " "r8=%p r9=%p r10=%p r11=%p r12=%p r13=%p r14=%p r15=%p " - "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x prev=%08x\n", + "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x\n", (void *)context.Rax, (void *)context.Rbx, (void *)context.Rcx, (void *)context.Rdx, (void *)context.Rsi, (void *)context.Rdi, (void *)context.R8, (void *)context.R9, (void *)context.R10, (void *)context.R11, (void *)context.R12, (void *)context.R13, @@ -4155,7 +4155,7 @@ static void test_thread_context(void) expect.SegFs, expect.SegGs, expect.SegSs, expect.EFlags, expect.prev_frame ); trace( "actual: rax=%p rbx=%p rcx=%p rdx=%p rsi=%p rdi=%p " "r8=%p r9=%p r10=%p r11=%p r12=%p r13=%p r14=%p r15=%p " - "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x prev=%08x\n", + "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x\n", (void *)context.Rax, (void *)context.Rbx, (void *)context.Rcx, (void *)context.Rdx, (void *)context.Rsi, (void *)context.Rdi, (void *)context.R8, (void *)context.R9, (void *)context.R10, (void *)context.R11, (void *)context.R12, (void *)context.R13, @@ -4293,7 +4293,7 @@ static void test_wow64_context(void) ok((WORD)ctx_ptr->FloatSave.ControlWord == ctx.FloatSave.ControlWord, "got control word %08x / %08x\n", ctx_ptr->FloatSave.ControlWord, ctx.FloatSave.ControlWord); ok(*(WORD *)ctx_ptr->ExtendedRegisters == *(WORD *)ctx.ExtendedRegisters, - "got SSE control word %04x\n", *(WORD *)ctx_ptr->ExtendedRegisters, + "got SSE control word %04x / %04x\n", *(WORD *)ctx_ptr->ExtendedRegisters, *(WORD *)ctx.ExtendedRegisters);
ecx = ctx.Ecx; diff --git a/dlls/ntdll/tests/wow64.c b/dlls/ntdll/tests/wow64.c index f5d7b08cac3..1c8ca28a999 100644 --- a/dlls/ntdll/tests/wow64.c +++ b/dlls/ntdll/tests/wow64.c @@ -604,7 +604,7 @@ static void test_cpu_area(void) ok( info.ContextFlagsLocation == (char *)info.Context + tests[i].offset, "%u:%u: wrong flags offset %u\n", i, j, (ULONG)((char *)info.ContextFlagsLocation - (char *)info.Context) ); - ok( info.CpuReserved == cpu, "%u:%u: wrong cpu %p / %p\n", info.CpuReserved, cpu ); + ok( info.CpuReserved == cpu, "%u:%u: wrong cpu %p / %p\n", i, j, info.CpuReserved, cpu ); ok( info.ContextFlag == tests[i].flag, "%u:%u: wrong flag %08x\n", i, j, info.ContextFlag ); ok( info.Machine == tests[i].machine, "%u:%u: wrong machine %x\n", i, j, info.Machine ); }