Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2022
- 87 participants
- 926 discussions
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/wow64/Makefile.in | 1 -
dlls/wow64/process.c | 6 +++---
dlls/wow64/registry.c | 2 +-
dlls/wow64/security.c | 4 ++--
dlls/wow64/sync.c | 2 +-
dlls/wow64/syscall.c | 10 +++++-----
dlls/wow64/system.c | 2 +-
dlls/wow64/virtual.c | 4 ++--
8 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/dlls/wow64/Makefile.in b/dlls/wow64/Makefile.in
index 6b161b5cc3e..eebf9e8e53a 100644
--- a/dlls/wow64/Makefile.in
+++ b/dlls/wow64/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wow64.dll
IMPORTLIB = wow64
IMPORTS = ntdll winecrt0
diff --git a/dlls/wow64/process.c b/dlls/wow64/process.c
index 52f6b952031..82ca4181116 100644
--- a/dlls/wow64/process.c
+++ b/dlls/wow64/process.c
@@ -365,7 +365,7 @@ static void call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32
ctx.EFlags &= ~(0x100|0x400|0x40000);
NtSetInformationThread( GetCurrentThread(), ThreadWow64Context, &ctx, sizeof(ctx) );
- TRACE( "exception %08x dispatcher %08x stack %08x eip %08x\n",
+ TRACE( "exception %08lx dispatcher %08lx stack %08lx eip %08lx\n",
rec->ExceptionCode, ctx.Eip, ctx.Esp, stack->context.Eip );
}
break;
@@ -392,7 +392,7 @@ static void call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32
else ctx.Cpsr &= ~0x20;
NtSetInformationThread( GetCurrentThread(), ThreadWow64Context, &ctx, sizeof(ctx) );
- TRACE( "exception %08x dispatcher %08x stack %08x pc %08x\n",
+ TRACE( "exception %08lx dispatcher %08lx stack %08lx pc %08lx\n",
rec->ExceptionCode, ctx.Pc, ctx.Sp, stack->context.Sp );
}
break;
@@ -516,7 +516,7 @@ NTSTATUS WINAPI wow64_NtCreateThread( UINT *args )
void *initial_teb = get_ptr( &args );
BOOLEAN suspended = get_ulong( &args );
- FIXME( "%p %x %p %p %p %p %p %u: stub\n", handle_ptr, access, attr32, process,
+ FIXME( "%p %lx %p %p %p %p %p %u: stub\n", handle_ptr, access, attr32, process,
id32, context, initial_teb, suspended );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/registry.c b/dlls/wow64/registry.c
index e89c65c4c5e..dfb75d72bc7 100644
--- a/dlls/wow64/registry.c
+++ b/dlls/wow64/registry.c
@@ -349,7 +349,7 @@ NTSTATUS WINAPI wow64_NtQueryMultipleValueKey( UINT *args )
ULONG len = get_ulong( &args );
ULONG *retlen = get_ptr( &args );
- FIXME( "%p %p %u %p %u %p: stub\n", handle, info, count, ptr, len, retlen );
+ FIXME( "%p %p %lu %p %lu %p: stub\n", handle, info, count, ptr, len, retlen );
return STATUS_SUCCESS;
}
diff --git a/dlls/wow64/security.c b/dlls/wow64/security.c
index 1c8f82d9a3a..680f5a6ec56 100644
--- a/dlls/wow64/security.c
+++ b/dlls/wow64/security.c
@@ -110,7 +110,7 @@ NTSTATUS WINAPI wow64_NtAdjustGroupsToken( UINT *args )
TOKEN_GROUPS32 *prev = get_ptr( &args );
ULONG *retlen = get_ptr( &args );
- FIXME( "%p %d %p %u %p %p\n", handle, reset, groups, len, prev, retlen );
+ FIXME( "%p %d %p %lu %p %p\n", handle, reset, groups, len, prev, retlen );
return STATUS_NOT_IMPLEMENTED;
}
@@ -146,7 +146,7 @@ NTSTATUS WINAPI wow64_NtCreateLowBoxToken( UINT *args )
ULONG handle_count = get_ulong( &args );
ULONG *handles32 = get_ptr( &args );
- FIXME( "%p %p %x %p %p %u %p %u %p: stub\n",
+ FIXME( "%p %p %lx %p %p %lu %p %lu %p: stub\n",
handle_ptr, token, access, attr32, sid, count, capabilities32, handle_count, handles32 );
*handle_ptr = 0;
diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c
index b8f3fabe06c..d4122ddf3f3 100644
--- a/dlls/wow64/sync.c
+++ b/dlls/wow64/sync.c
@@ -141,7 +141,7 @@ NTSTATUS WINAPI wow64_NtAcceptConnectPort( UINT *args )
LPC_SECTION_WRITE *write = get_ptr( &args );
LPC_SECTION_READ *read = get_ptr( &args );
- FIXME( "%p %u %p %u %p %p: stub\n", handle_ptr, id, msg, accept, write, read );
+ FIXME( "%p %lu %p %u %p %p: stub\n", handle_ptr, id, msg, accept, write, read );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c
index 42e852f4d28..7cab0894738 100644
--- a/dlls/wow64/syscall.c
+++ b/dlls/wow64/syscall.c
@@ -455,9 +455,9 @@ static void init_syscall_table( HMODULE module, ULONG idx, const SYSTEM_SERVICE_
thunks[start_pos + table_pos] = (syscall_thunk)orig_table->ServiceTable[wrap_pos++];
max_pos = max( table_pos, max_pos );
}
- else ERR( "invalid syscall id %04x for %s\n", id, name );
+ else ERR( "invalid syscall id %04lx for %s\n", id, name );
}
- else ERR( "wrong syscall table id %04x for %s\n", id, name );
+ else ERR( "wrong syscall table id %04lx for %s\n", id, name );
}
else if (res > 0)
{
@@ -465,7 +465,7 @@ static void init_syscall_table( HMODULE module, ULONG idx, const SYSTEM_SERVICE_
wrap_pos++;
exp_pos--; /* try again */
}
- else FIXME( "missing wrapper for syscall %04x %s\n", id, name );
+ else FIXME( "missing wrapper for syscall %04lx %s\n", id, name );
}
for ( ; wrap_pos < orig_table->ServiceLimit; wrap_pos++)
@@ -492,7 +492,7 @@ static HMODULE load_64bit_module( const WCHAR *name )
RtlInitUnicodeString( &str, path );
if ((status = LdrLoadDll( NULL, 0, &str, &module )))
{
- ERR( "failed to load dll %x\n", status );
+ ERR( "failed to load dll %lx\n", status );
NtTerminateProcess( GetCurrentProcess(), status );
}
return module;
@@ -535,7 +535,7 @@ static HMODULE load_32bit_module( const WCHAR *name )
if (!status) return module;
failed:
- ERR( "failed to load dll %x\n", status );
+ ERR( "failed to load dll %lx\n", status );
NtTerminateProcess( GetCurrentProcess(), status );
return NULL;
}
diff --git a/dlls/wow64/system.c b/dlls/wow64/system.c
index 092319cba84..0727bc25bbe 100644
--- a/dlls/wow64/system.c
+++ b/dlls/wow64/system.c
@@ -686,7 +686,7 @@ NTSTATUS WINAPI wow64_NtRaiseHardError( UINT *args )
HARDERROR_RESPONSE_OPTION option = get_ulong( &args );
HARDERROR_RESPONSE *response = get_ptr( &args );
- FIXME( "%08x %u %x %p %u %p: stub\n", status, count, params_mask, params, option, response );
+ FIXME( "%08lx %lu %lx %p %u %p: stub\n", status, count, params_mask, params, option, response );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/virtual.c b/dlls/wow64/virtual.c
index f4cd50d0ea2..fc470c07923 100644
--- a/dlls/wow64/virtual.c
+++ b/dlls/wow64/virtual.c
@@ -77,7 +77,7 @@ NTSTATUS WINAPI wow64_NtAllocateVirtualMemoryEx( UINT *args )
SIZE_T size;
NTSTATUS status;
- if (count) FIXME( "%d extended parameters %p\n", count, params );
+ if (count) FIXME( "%ld extended parameters %p\n", count, params );
status = NtAllocateVirtualMemoryEx( process, addr_32to64( &addr, addr32 ), size_32to64( &size, size32 ),
type, protect, params, count );
if (!status)
@@ -430,7 +430,7 @@ NTSTATUS WINAPI wow64_NtSetLdtEntries( UINT *args )
ULONG entry2_low = get_ulong( &args );
ULONG entry2_high = get_ulong( &args );
- FIXME( "%04x %08x %08x %04x %08x %08x: stub\n",
+ FIXME( "%04lx %08lx %08lx %04lx %08lx %08lx: stub\n",
sel1, entry1_low, entry1_high, sel2, entry2_low, entry2_high );
return STATUS_NOT_IMPLEMENTED;
}
--
2.34.1
1
0
[PATCH v2 1/5] shlwapi/tests: Remove workarounds from url.c for no longer supported Windows versions.
by Zebediah Figura 11 Feb '22
by Zebediah Figura 11 Feb '22
11 Feb '22
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/shlwapi/tests/url.c | 66 ++++++++++++----------------------------
1 file changed, 19 insertions(+), 47 deletions(-)
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c
index 703bdcd0a55..65fc2cfedd1 100644
--- a/dlls/shlwapi/tests/url.c
+++ b/dlls/shlwapi/tests/url.c
@@ -295,7 +295,6 @@ typedef struct _TEST_URL_ESCAPEW {
DWORD flags;
const WCHAR expecturl[INTERNET_MAX_URL_LENGTH];
const WCHAR win7url[INTERNET_MAX_URL_LENGTH]; /* <= Win7 */
- const WCHAR vistaurl[INTERNET_MAX_URL_LENGTH]; /* <= Vista/2k8 */
} TEST_URL_ESCAPEW;
static const TEST_URL_ESCAPEW TEST_ESCAPEW[] = {
@@ -311,12 +310,10 @@ static const TEST_URL_ESCAPEW TEST_ESCAPEW[] = {
{'M','a','%','D','F',0}},
/* 0x2070E */
{{0xd841,0xdf0e,0}, URL_ESCAPE_AS_UTF8, {'%','F','0','%','A','0','%','9','C','%','8','E',0},
- {'%','E','F','%','B','F','%','B','D','%','E','F','%','B','F','%','B','D',0},
- {0xd841,0xdf0e,0}},
+ {'%','E','F','%','B','F','%','B','D','%','E','F','%','B','F','%','B','D',0}},
/* 0x27A3E */
{{0xd85e,0xde3e,0}, URL_ESCAPE_AS_UTF8, {'%','F','0','%','A','7','%','A','8','%','B','E',0},
- {'%','E','F','%','B','F','%','B','D','%','E','F','%','B','F','%','B','D',0},
- {0xd85e,0xde3e,0}},
+ {'%','E','F','%','B','F','%','B','D','%','E','F','%','B','F','%','B','D',0}},
{{0xd85e,0}, URL_ESCAPE_AS_UTF8, {'%','E','F','%','B','F','%','B','D',0},
{0xd85e,0}},
@@ -414,12 +411,7 @@ static const struct {
{"c:\\foo/b a%r", "file:///c:/foo/b%20a%25r", S_OK},
{"c:\\foo\\foo bar", "file:///c:/foo/foo%20bar", S_OK},
{"file:///c:/foo/bar", "file:///c:/foo/bar", S_FALSE},
-#if 0
- /* The following test fails on native shlwapi as distributed with Win95/98.
- * Wine matches the behaviour of later versions.
- */
{"xx:c:\\foo\\bar", "xx:c:\\foo\\bar", S_FALSE}
-#endif
};
/* ################ */
@@ -614,8 +606,8 @@ static void test_url_part(const char* szUrl, DWORD dwPart, DWORD dwFlags, const
dwSize = 1;
res = UrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags);
ok(res == E_POINTER, "UrlGetPart for \"%s\" gave: 0x%08x\n", szUrl, res);
- ok(dwSize == strlen(szExpected)+1 ||
- (*szExpected == '?' && dwSize == strlen(szExpected)),
+ todo_wine_if (dwPart == URL_PART_QUERY)
+ ok(dwSize == strlen(szExpected) + 1,
"UrlGetPart for \"%s\" gave size: %u\n", szUrl, dwSize);
dwSize = INTERNET_MAX_URL_LENGTH;
@@ -638,9 +630,8 @@ static void test_url_part(const char* szUrl, DWORD dwPart, DWORD dwFlags, const
FreeWideString(wszConvertedPart);
FreeWideString(wszUrl);
- /* Note that v6.0 and later don't return '?' with the query */
- ok(strcmp(szPart,szExpected)==0 ||
- (*szExpected=='?' && !strcmp(szPart,szExpected+1)),
+ todo_wine_if (dwPart == URL_PART_QUERY)
+ ok(!strcmp(szPart,szExpected),
"Expected %s, but got %s\n", szExpected, szPart);
}
@@ -707,7 +698,7 @@ static void test_UrlGetPart(void)
test_url_part(TEST_URL_3, URL_PART_USERNAME, 0, "foo");
test_url_part(TEST_URL_3, URL_PART_PASSWORD, 0, "bar");
test_url_part(TEST_URL_3, URL_PART_SCHEME, 0, "http");
- test_url_part(TEST_URL_3, URL_PART_QUERY, 0, "?query=x&return=y");
+ test_url_part(TEST_URL_3, URL_PART_QUERY, 0, "query=x&return=y");
test_url_part(TEST_URL_4, URL_PART_HOSTNAME, 0, "google.*.com");
@@ -855,10 +846,8 @@ static void test_UrlEscapeA(void)
size = 1;
empty_string[0] = 127;
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_AS_UTF8);
- ok(ret == E_NOTIMPL || broken(ret == E_POINTER), /* < Win7/Win2k8 */
- "got %x, expected %x\n", ret, E_NOTIMPL);
- ok(size == 1 || broken(size == 34), /* < Win7/Win2k8 */
- "got %d, expected %d\n", size, 1);
+ ok(ret == E_NOTIMPL, "Got unexpected hr %#x.\n", ret);
+ ok(size == 1, "Got unexpected size %u.\n", size);
ok(empty_string[0] == 127, "String has changed, empty_string[0] = %d\n", empty_string[0]);
for (i = 0; i < ARRAY_SIZE(TEST_ESCAPE); i++) {
@@ -962,12 +951,10 @@ static void test_UrlEscapeW(void)
size = INTERNET_MAX_URL_LENGTH;
ret = UrlEscapeW(TEST_ESCAPEW[i].url, ret_url, &size, TEST_ESCAPEW[i].flags);
ok(ret == S_OK, "Got unexpected hr %#x for %s.\n", ret, debugstr_w(TEST_ESCAPEW[i].url));
- ok(!lstrcmpW(ret_url, TEST_ESCAPEW[i].expecturl) ||
- broken(!lstrcmpW(ret_url, TEST_ESCAPEW[i].vistaurl)) ||
- broken(!lstrcmpW(ret_url, TEST_ESCAPEW[i].win7url)),
- "Expected \"%s\" or \"%s\" or \"%s\", but got \"%s\" for \"%s\"\n",
- wine_dbgstr_w(TEST_ESCAPEW[i].expecturl), wine_dbgstr_w(TEST_ESCAPEW[i].vistaurl),
- wine_dbgstr_w(TEST_ESCAPEW[i].win7url), wine_dbgstr_w(ret_url), wine_dbgstr_w(TEST_ESCAPEW[i].url));
+ ok(!wcscmp(ret_url, TEST_ESCAPEW[i].expecturl)
+ || broken(!wcscmp(ret_url, TEST_ESCAPEW[i].win7url)),
+ "Expected %s, but got %s for %s.\n", debugstr_w(TEST_ESCAPEW[i].expecturl),
+ debugstr_w(ret_url), debugstr_w(TEST_ESCAPEW[i].url));
}
}
@@ -1484,36 +1471,27 @@ static void test_HashData(void)
/* Test hashing with identically sized input/output buffers. */
res = HashData(input, 16, output, 16);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
- if(res == S_OK)
- ok(!memcmp(output, expected, sizeof(expected)),
- "Output buffer did not match expected contents\n");
+ ok(!memcmp(output, expected, sizeof(expected)), "data didn't match\n");
/* Test hashing with larger output buffer. */
res = HashData(input, 16, output, 32);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
- if(res == S_OK)
- ok(!memcmp(output, expected2, sizeof(expected2)),
- "Output buffer did not match expected contents\n");
+ ok(!memcmp(output, expected2, sizeof(expected2)), "data didn't match\n");
/* Test hashing with smaller input buffer. */
res = HashData(input, 8, output, 16);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
- if(res == S_OK)
- ok(!memcmp(output, expected3, sizeof(expected3)),
- "Output buffer did not match expected contents\n");
+ ok(!memcmp(output, expected3, sizeof(expected3)), "data didn't match\n");
/* Test passing NULL pointers for input/output parameters. */
res = HashData(NULL, 0, NULL, 0);
- ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
- "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
+ ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res);
res = HashData(input, 0, NULL, 0);
- ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
- "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
+ ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res);
res = HashData(NULL, 0, output, 0);
- ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
- "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
+ ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res);
/* Test passing valid pointers with sizes of zero. */
for (i = 0; i < ARRAY_SIZE(input); i++)
@@ -1527,16 +1505,10 @@ static void test_HashData(void)
/* The buffers should be unchanged. */
for (i = 0; i < ARRAY_SIZE(input); i++)
- {
ok(input[i] == 0x00, "Expected the input buffer to be unchanged\n");
- if(input[i] != 0x00) break;
- }
for (i = 0; i < ARRAY_SIZE(output); i++)
- {
ok(output[i] == 0xFF, "Expected the output buffer to be unchanged\n");
- if(output[i] != 0xFF) break;
- }
/* Input/output parameters are not validated. */
res = HashData((BYTE *)0xdeadbeef, 0, (BYTE *)0xdeadbeef, 0);
--
2.34.1
1
4
[PATCH v2 1/5] ws2_32/tests: Use winetest_push_context() in test_WSAStringToAddress().
by Zebediah Figura 11 Feb '22
by Zebediah Figura 11 Feb '22
11 Feb '22
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/ws2_32/tests/protocol.c | 86 ++++++++++++++----------------------
1 file changed, 33 insertions(+), 53 deletions(-)
diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c
index 1ff335f7fe2..d902d399c00 100644
--- a/dlls/ws2_32/tests/protocol.c
+++ b/dlls/ws2_32/tests/protocol.c
@@ -1403,12 +1403,11 @@ static void test_WSAStringToAddress(void)
{ "", { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, WSAEINVAL },
};
+ int len, ret, expected_len;
WCHAR inputW[64];
- INT len, ret, expected_len, expected_ret;
- short expected_family;
SOCKADDR_IN sockaddr;
SOCKADDR_IN6 sockaddr6;
- int i, j;
+ unsigned int i, j;
len = 0;
WSASetLastError( 0 );
@@ -1420,12 +1419,16 @@ static void test_WSAStringToAddress(void)
for (i = 0; i < 2; i++)
{
+ winetest_push_context( i ? "unicode" : "ascii" );
+
for (j = 0; j < ARRAY_SIZE(ipv4_tests); j++)
{
len = sizeof(sockaddr) + 10;
expected_len = ipv4_tests[j].error ? len : sizeof(sockaddr);
memset( &sockaddr, 0xab, sizeof(sockaddr) );
+ winetest_push_context( "addr %s", debugstr_a(ipv4_tests[j].input) );
+
WSASetLastError( 0 );
if (i == 0)
{
@@ -1436,26 +1439,16 @@ static void test_WSAStringToAddress(void)
MultiByteToWideChar( CP_ACP, 0, ipv4_tests[j].input, -1, inputW, ARRAY_SIZE(inputW) );
ret = WSAStringToAddressW( inputW, AF_INET, NULL, (SOCKADDR *)&sockaddr, &len );
}
- expected_ret = ipv4_tests[j].error ? SOCKET_ERROR : 0;
- expected_family = ipv4_tests[j].error ? 0 : AF_INET;
- ok( ret == expected_ret,
- "WSAStringToAddress(%s) returned %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), ret, expected_ret );
- ok( WSAGetLastError() == ipv4_tests[j].error,
- "WSAStringToAddress(%s) gave error %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), WSAGetLastError(), ipv4_tests[j].error );
- ok( sockaddr.sin_family == expected_family,
- "WSAStringToAddress(%s) gave family %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_family, expected_family );
+ ok( ret == (ipv4_tests[j].error ? SOCKET_ERROR : 0), "got %d\n", ret );
+ ok( WSAGetLastError() == ipv4_tests[j].error, "got error %d\n", WSAGetLastError() );
+ ok( sockaddr.sin_family == (ipv4_tests[j].error ? 0 : AF_INET),
+ "got family %#x\n", sockaddr.sin_family );
ok( sockaddr.sin_addr.s_addr == htonl( ipv4_tests[j].address ),
- "WSAStringToAddress(%s) gave address %08x, expected %08x\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_addr.s_addr, htonl( ipv4_tests[j].address) );
- ok( sockaddr.sin_port == htons( ipv4_tests[j].port ),
- "WSAStringToAddress(%s) gave port %04x, expected %04x\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_port, htons( ipv4_tests[j].port ) );
- ok( len == expected_len,
- "WSAStringToAddress(%s) gave length %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), len, expected_len );
+ "got addr %08x\n", sockaddr.sin_addr.s_addr );
+ ok( sockaddr.sin_port == htons( ipv4_tests[j].port ), "got port %u\n", sockaddr.sin_port );
+ ok( len == expected_len, "got len %d\n", len );
+
+ winetest_pop_context();
}
for (j = 0; j < ARRAY_SIZE(ipv6_tests); j++)
@@ -1479,41 +1472,28 @@ static void test_WSAStringToAddress(void)
win_skip("IPv6 not supported\n");
break;
}
- expected_ret = ipv6_tests[j].error ? SOCKET_ERROR : 0;
- expected_family = ipv6_tests[j].error ? 0 : AF_INET6;
- ok( ret == expected_ret,
- "WSAStringToAddress(%s) returned %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), ret, expected_ret );
- ok( WSAGetLastError() == ipv6_tests[j].error,
- "WSAStringToAddress(%s) gave error %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), WSAGetLastError(), ipv6_tests[j].error );
- ok( sockaddr6.sin6_family == expected_family,
- "WSAStringToAddress(%s) gave family %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr6.sin6_family, expected_family );
- ok( memcmp(&sockaddr6.sin6_addr, ipv6_tests[j].address, sizeof(sockaddr6.sin6_addr)) == 0,
- "WSAStringToAddress(%s) gave address %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
- wine_dbgstr_a( ipv6_tests[j].input ),
+
+ winetest_push_context( "addr %s", debugstr_a(ipv6_tests[j].input) );
+
+ ok( ret == (ipv6_tests[j].error ? SOCKET_ERROR : 0), "got %d\n", ret );
+ ok( WSAGetLastError() == ipv6_tests[j].error, "got error %d\n", WSAGetLastError() );
+ ok( sockaddr6.sin6_family == (ipv6_tests[j].error ? 0 : AF_INET6),
+ "got family %#x\n", sockaddr6.sin6_family );
+ ok( !memcmp( &sockaddr6.sin6_addr, ipv6_tests[j].address, sizeof(sockaddr6.sin6_addr) ),
+ "got addr %x:%x:%x:%x:%x:%x:%x:%x\n",
sockaddr6.sin6_addr.s6_words[0], sockaddr6.sin6_addr.s6_words[1],
sockaddr6.sin6_addr.s6_words[2], sockaddr6.sin6_addr.s6_words[3],
sockaddr6.sin6_addr.s6_words[4], sockaddr6.sin6_addr.s6_words[5],
- sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7],
- ipv6_tests[j].address[0], ipv6_tests[j].address[1],
- ipv6_tests[j].address[2], ipv6_tests[j].address[3],
- ipv6_tests[j].address[4], ipv6_tests[j].address[5],
- ipv6_tests[j].address[6], ipv6_tests[j].address[7] );
- ok( sockaddr6.sin6_scope_id == 0,
- "WSAStringToAddress(%s) gave scope %d, expected 0\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_scope_id );
- ok( sockaddr6.sin6_port == ipv6_tests[j].port,
- "WSAStringToAddress(%s) gave port %04x, expected %04x\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_port, ipv6_tests[j].port );
- ok( sockaddr6.sin6_flowinfo == 0,
- "WSAStringToAddress(%s) gave flowinfo %d, expected 0\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_flowinfo );
- ok( len == expected_len,
- "WSAStringToAddress(%s) gave length %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), len, expected_len );
+ sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7] );
+ ok( !sockaddr6.sin6_scope_id, "got scope id %u\n", sockaddr6.sin6_scope_id );
+ ok( sockaddr6.sin6_port == ipv6_tests[j].port, "got port %u\n", sockaddr6.sin6_port );
+ ok( !sockaddr6.sin6_flowinfo, "got flowinfo %u\n", sockaddr6.sin6_flowinfo );
+ ok( len == expected_len, "got len %d\n", len );
+
+ winetest_pop_context();
}
+
+ winetest_pop_context();
}
}
--
2.34.1
2
5
[PATCH 1/5] ws2_32/tests: Use winetest_push_context() in test_WSAStringToAddress().
by Zebediah Figura 11 Feb '22
by Zebediah Figura 11 Feb '22
11 Feb '22
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/ws2_32/tests/protocol.c | 88 ++++++++++++++----------------------
1 file changed, 33 insertions(+), 55 deletions(-)
diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c
index 1ff335f7fe2..81b2067d704 100644
--- a/dlls/ws2_32/tests/protocol.c
+++ b/dlls/ws2_32/tests/protocol.c
@@ -1404,11 +1404,10 @@ static void test_WSAStringToAddress(void)
};
WCHAR inputW[64];
- INT len, ret, expected_len, expected_ret;
- short expected_family;
SOCKADDR_IN sockaddr;
SOCKADDR_IN6 sockaddr6;
- int i, j;
+ unsigned int i, j;
+ int len, ret;
len = 0;
WSASetLastError( 0 );
@@ -1420,12 +1419,15 @@ static void test_WSAStringToAddress(void)
for (i = 0; i < 2; i++)
{
+ winetest_push_context( i ? "unicode" : "ascii" );
+
for (j = 0; j < ARRAY_SIZE(ipv4_tests); j++)
{
len = sizeof(sockaddr) + 10;
- expected_len = ipv4_tests[j].error ? len : sizeof(sockaddr);
memset( &sockaddr, 0xab, sizeof(sockaddr) );
+ winetest_push_context( "addr %s", debugstr_a(ipv4_tests[j].input) );
+
WSASetLastError( 0 );
if (i == 0)
{
@@ -1436,32 +1438,21 @@ static void test_WSAStringToAddress(void)
MultiByteToWideChar( CP_ACP, 0, ipv4_tests[j].input, -1, inputW, ARRAY_SIZE(inputW) );
ret = WSAStringToAddressW( inputW, AF_INET, NULL, (SOCKADDR *)&sockaddr, &len );
}
- expected_ret = ipv4_tests[j].error ? SOCKET_ERROR : 0;
- expected_family = ipv4_tests[j].error ? 0 : AF_INET;
- ok( ret == expected_ret,
- "WSAStringToAddress(%s) returned %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), ret, expected_ret );
- ok( WSAGetLastError() == ipv4_tests[j].error,
- "WSAStringToAddress(%s) gave error %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), WSAGetLastError(), ipv4_tests[j].error );
- ok( sockaddr.sin_family == expected_family,
- "WSAStringToAddress(%s) gave family %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_family, expected_family );
+ ok( ret == (ipv4_tests[j].error ? SOCKET_ERROR : 0), "got %d\n", ret );
+ ok( WSAGetLastError() == ipv4_tests[j].error, "got error %d\n", WSAGetLastError() );
+ ok( sockaddr.sin_family == (ipv4_tests[j].error ? 0 : AF_INET),
+ "got family %#x\n", sockaddr.sin_family );
ok( sockaddr.sin_addr.s_addr == htonl( ipv4_tests[j].address ),
- "WSAStringToAddress(%s) gave address %08x, expected %08x\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_addr.s_addr, htonl( ipv4_tests[j].address) );
- ok( sockaddr.sin_port == htons( ipv4_tests[j].port ),
- "WSAStringToAddress(%s) gave port %04x, expected %04x\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_port, htons( ipv4_tests[j].port ) );
- ok( len == expected_len,
- "WSAStringToAddress(%s) gave length %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), len, expected_len );
+ "got addr %08x\n", sockaddr.sin_addr.s_addr );
+ ok( sockaddr.sin_port == htons( ipv4_tests[j].port ), "got port %u\n", sockaddr.sin_port );
+ ok( len == (ipv4_tests[j].error ? len : sizeof(sockaddr)), "got len %d\n", len );
+
+ winetest_pop_context();
}
for (j = 0; j < ARRAY_SIZE(ipv6_tests); j++)
{
len = sizeof(sockaddr6) + 10;
- expected_len = ipv6_tests[j].error ? len : sizeof(sockaddr6);
memset( &sockaddr6, 0xab, sizeof(sockaddr6) );
WSASetLastError( 0 );
@@ -1479,41 +1470,28 @@ static void test_WSAStringToAddress(void)
win_skip("IPv6 not supported\n");
break;
}
- expected_ret = ipv6_tests[j].error ? SOCKET_ERROR : 0;
- expected_family = ipv6_tests[j].error ? 0 : AF_INET6;
- ok( ret == expected_ret,
- "WSAStringToAddress(%s) returned %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), ret, expected_ret );
- ok( WSAGetLastError() == ipv6_tests[j].error,
- "WSAStringToAddress(%s) gave error %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), WSAGetLastError(), ipv6_tests[j].error );
- ok( sockaddr6.sin6_family == expected_family,
- "WSAStringToAddress(%s) gave family %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr6.sin6_family, expected_family );
- ok( memcmp(&sockaddr6.sin6_addr, ipv6_tests[j].address, sizeof(sockaddr6.sin6_addr)) == 0,
- "WSAStringToAddress(%s) gave address %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
- wine_dbgstr_a( ipv6_tests[j].input ),
+
+ winetest_push_context( "addr %s", debugstr_a(ipv6_tests[j].input) );
+
+ ok( ret == (ipv6_tests[j].error ? SOCKET_ERROR : 0), "got %d\n", ret );
+ ok( WSAGetLastError() == ipv6_tests[j].error, "got error %d\n", WSAGetLastError() );
+ ok( sockaddr6.sin6_family == (ipv6_tests[j].error ? 0 : AF_INET6),
+ "got family %#x\n", sockaddr6.sin6_family );
+ ok( !memcmp( &sockaddr6.sin6_addr, ipv6_tests[j].address, sizeof(sockaddr6.sin6_addr) ),
+ "got addr %x:%x:%x:%x:%x:%x:%x:%x\n",
sockaddr6.sin6_addr.s6_words[0], sockaddr6.sin6_addr.s6_words[1],
sockaddr6.sin6_addr.s6_words[2], sockaddr6.sin6_addr.s6_words[3],
sockaddr6.sin6_addr.s6_words[4], sockaddr6.sin6_addr.s6_words[5],
- sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7],
- ipv6_tests[j].address[0], ipv6_tests[j].address[1],
- ipv6_tests[j].address[2], ipv6_tests[j].address[3],
- ipv6_tests[j].address[4], ipv6_tests[j].address[5],
- ipv6_tests[j].address[6], ipv6_tests[j].address[7] );
- ok( sockaddr6.sin6_scope_id == 0,
- "WSAStringToAddress(%s) gave scope %d, expected 0\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_scope_id );
- ok( sockaddr6.sin6_port == ipv6_tests[j].port,
- "WSAStringToAddress(%s) gave port %04x, expected %04x\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_port, ipv6_tests[j].port );
- ok( sockaddr6.sin6_flowinfo == 0,
- "WSAStringToAddress(%s) gave flowinfo %d, expected 0\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_flowinfo );
- ok( len == expected_len,
- "WSAStringToAddress(%s) gave length %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), len, expected_len );
+ sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7] );
+ ok( !sockaddr6.sin6_scope_id, "got scope id %u\n", sockaddr6.sin6_scope_id );
+ ok( sockaddr6.sin6_port == ipv6_tests[j].port, "got port %u\n", sockaddr6.sin6_port );
+ ok( !sockaddr6.sin6_flowinfo, "got flowinfo %u\n", sockaddr6.sin6_flowinfo );
+ ok( len == (ipv6_tests[j].error ? len : sizeof(sockaddr)), "got len %d\n", len );
+
+ winetest_pop_context();
}
+
+ winetest_pop_context();
}
}
--
2.34.1
2
8
11 Feb '22
Needed for native mfc42u.dll.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com>
---
v7: Rebase.
---
configure.ac | 1 +
.../Makefile.in | 1 +
.../api-ms-win-core-privateprofile-l1-1-0.spec | 14 ++++++++++++++
3 files changed, 16 insertions(+)
create mode 100644 dlls/api-ms-win-core-privateprofile-l1-1-0/Makefile.in
create mode 100644 dlls/api-ms-win-core-privateprofile-l1-1-0/api-ms-win-core-privateprofile-l1-1-0.spec
diff --git a/configure.ac b/configure.ac
index e51e114c45e..f018256bd22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2416,6 +2416,7 @@ WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-namedpipe-l1-2-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-namespace-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-normalization-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-path-l1-1-0)
+WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-privateprofile-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-privateprofile-l1-1-1)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-processenvironment-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-processenvironment-l1-2-0)
diff --git a/dlls/api-ms-win-core-privateprofile-l1-1-0/Makefile.in b/dlls/api-ms-win-core-privateprofile-l1-1-0/Makefile.in
new file mode 100644
index 00000000000..c8b8ef84aef
--- /dev/null
+++ b/dlls/api-ms-win-core-privateprofile-l1-1-0/Makefile.in
@@ -0,0 +1 @@
+MODULE = api-ms-win-core-privateprofile-l1-1-0.dll
diff --git a/dlls/api-ms-win-core-privateprofile-l1-1-0/api-ms-win-core-privateprofile-l1-1-0.spec b/dlls/api-ms-win-core-privateprofile-l1-1-0/api-ms-win-core-privateprofile-l1-1-0.spec
new file mode 100644
index 00000000000..c8153c3a296
--- /dev/null
+++ b/dlls/api-ms-win-core-privateprofile-l1-1-0/api-ms-win-core-privateprofile-l1-1-0.spec
@@ -0,0 +1,14 @@
+@ stdcall GetPrivateProfileIntA(str str long str) kernel32.GetPrivateProfileIntA
+@ stdcall GetPrivateProfileIntW(wstr wstr long wstr) kernel32.GetPrivateProfileIntW
+@ stdcall GetPrivateProfileSectionW(wstr ptr long wstr) kernel32.GetPrivateProfileSectionW
+@ stdcall GetPrivateProfileStringA(str str str ptr long str) kernel32.GetPrivateProfileStringA
+@ stdcall GetPrivateProfileStringW(wstr wstr wstr ptr long wstr) kernel32.GetPrivateProfileStringW
+@ stdcall GetProfileIntA(str str long) kernel32.GetProfileIntA
+@ stdcall GetProfileIntW(wstr wstr long) kernel32.GetProfileIntW
+@ stdcall GetProfileSectionA(str ptr long) kernel32.GetProfileSectionA
+@ stdcall GetProfileSectionW(wstr ptr long) kernel32.GetProfileSectionW
+@ stdcall GetProfileStringA(str str str ptr long) kernel32.GetProfileStringA
+@ stdcall GetProfileStringW(wstr wstr wstr ptr long) kernel32.GetProfileStringW
+@ stdcall WritePrivateProfileSectionA(str str str) kernel32.WritePrivateProfileSectionA
+@ stdcall WritePrivateProfileStringA(str str str str) kernel32.WritePrivateProfileStringA
+@ stdcall WritePrivateProfileStringW(wstr wstr wstr wstr) kernel32.WritePrivateProfileStringW
--
2.35.1
1
4
10 Feb '22
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmstyle/tests/Makefile.in | 1 -
dlls/dmstyle/tests/dmstyle.c | 152 ++++++++++++++++-----------------
2 files changed, 76 insertions(+), 77 deletions(-)
diff --git a/dlls/dmstyle/tests/Makefile.in b/dlls/dmstyle/tests/Makefile.in
index a98f5dd6c27..ec8b0636014 100644
--- a/dlls/dmstyle/tests/Makefile.in
+++ b/dlls/dmstyle/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmstyle.dll
IMPORTS = ole32
diff --git a/dlls/dmstyle/tests/dmstyle.c b/dlls/dmstyle/tests/dmstyle.c
index 69c33ad73cf..4b16cdad1a1 100644
--- a/dlls/dmstyle/tests/dmstyle.c
+++ b/dlls/dmstyle/tests/dmstyle.c
@@ -55,13 +55,13 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusicStyle, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dms8);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicStyle8 create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicStyle8 create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dms8, "dms8 = %p\n", dms8);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicStyle, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
(void**)&dms8);
- ok(hr == E_NOINTERFACE, "DirectMusicStyle8 create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicStyle8 create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicStyle8 interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicStyle, NULL, CLSCTX_INPROC_SERVER,
@@ -70,26 +70,26 @@ static void test_COM(void)
win_skip("Old version without IDirectMusicStyle8\n");
return;
}
- ok(hr == S_OK, "DirectMusicStyle8 create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicStyle8 create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicStyle8_AddRef(dms8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicStyle8_QueryInterface(dms8, &IID_IDirectMusicObject, (void**)&dmo);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicStyle8_QueryInterface(dms8, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IPersistStream_Release(ps);
hr = IDirectMusicStyle8_QueryInterface(dms8, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicStyle8_Release(dms8));
@@ -107,36 +107,36 @@ static void test_COM_section(void)
hr = CoCreateInstance(&CLSID_DirectMusicSection, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmo);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicSection create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicSection create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmo, "dmo = %p\n", dmo);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicSection, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
(void**)&dmo);
todo_wine ok(hr == E_NOINTERFACE,
- "DirectMusicSection create failed: %08x, expected E_NOINTERFACE\n", hr);
+ "DirectMusicSection create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicObject interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicSection, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmo);
- todo_wine ok(hr == S_OK, "DirectMusicSection create failed: %08x, expected S_OK\n", hr);
+ todo_wine ok(hr == S_OK, "DirectMusicSection create failed: %#lx, expected S_OK\n", hr);
if (hr != S_OK) {
skip("DirectMusicSection not implemented\n");
return;
}
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IPersistStream_Release(ps);
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicObject_Release(dmo));
@@ -174,32 +174,32 @@ static void test_COM_track(void)
continue;
}
ok(hr == CLASS_E_NOAGGREGATION,
- "%s create failed: %08x, expected CLASS_E_NOAGGREGATION\n", class[i].name, hr);
+ "%s create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", class[i].name, hr);
ok(!dmt8, "dmt8 = %p\n", dmt8);
/* Invalid RIID */
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject,
(void**)&dmt8);
- ok(hr == E_NOINTERFACE, "%s create failed: %08x, expected E_NOINTERFACE\n",
+ ok(hr == E_NOINTERFACE, "%s create failed: %#lx, expected E_NOINTERFACE\n",
class[i].name, hr);
/* Same refcount for all DirectMusicTrack interfaces */
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack8,
(void**)&dmt8);
- ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
+ ok(hr == S_OK, "%s create failed: %#lx, expected S_OK\n", class[i].name, hr);
refcount = IDirectMusicTrack8_AddRef(dmt8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IPersistStream_Release(ps);
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicTrack8_Release(dmt8));
@@ -216,23 +216,23 @@ static void test_dmstyle(void)
hr = CoCreateInstance(&CLSID_DirectMusicStyle, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicStyle, (void**)&dms);
- ok(hr == S_OK, "DirectMusicStyle create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicStyle create failed: %#lx, expected S_OK\n", hr);
/* IPersistStream */
hr = IDirectMusicStyle_QueryInterface(dms, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
- ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&class, &CLSID_DirectMusicStyle),
"Expected class CLSID_DirectMusicStyle got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods*/
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicStyle_Release(dms));
}
@@ -244,7 +244,7 @@ static void expect_getparam(IDirectMusicTrack8 *track, REFGUID type, const char
char buf[64] = { 0 };
hr = IDirectMusicTrack8_GetParam(track, type, 0, NULL, buf);
- ok(hr == expect, "GetParam(%s) failed: %08x, expected %08x\n", name, hr, expect);
+ ok(hr == expect, "GetParam(%s) failed: %#lx, expected %#lx\n", name, hr, expect);
}
static void expect_setparam(IDirectMusicTrack8 *track, REFGUID type, const char *name,
@@ -253,7 +253,7 @@ static void expect_setparam(IDirectMusicTrack8 *track, REFGUID type, const char
HRESULT hr;
hr = IDirectMusicTrack8_SetParam(track, type, 0, track);
- ok(hr == expect, "SetParam(%s) failed: %08x, expected %08x\n", name, hr, expect);
+ ok(hr == expect, "SetParam(%s) failed: %#lx, expected %#lx\n", name, hr, expect);
}
static void test_track(void)
@@ -322,36 +322,36 @@ static void test_track(void)
trace("Testing %s\n", class[i].name);
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack8,
(void**)&dmt8);
- ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
+ ok(hr == S_OK, "%s create failed: %#lx, expected S_OK\n", class[i].name, hr);
/* IDirectMusicTrack8 */
hr = IDirectMusicTrack8_Init(dmt8, NULL);
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %#lx\n", hr);
if (class[i].clsid != &CLSID_DirectMusicChordTrack &&
class[i].clsid != &CLSID_DirectMusicCommandTrack) {
/* Crashes on native */
hr = IDirectMusicTrack8_InitPlay(dmt8, NULL, NULL, NULL, 0, 0);
if (class[i].clsid == &CLSID_DirectMusicMuteTrack)
- ok(hr == S_OK, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr);
+ ok(hr == S_OK, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
else
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
}
hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %#lx\n", hr);
for (j = 0; j < ARRAY_SIZE(param_types); j++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt8, param_types[j].type);
if (class[i].has_params & (1 << j))
- ok(hr == S_OK, "IsParamSupported(%s) failed: %08x, expected S_OK\n",
+ ok(hr == S_OK, "IsParamSupported(%s) failed: %#lx, expected S_OK\n",
param_types[j].name, hr);
else {
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
- "IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
+ "IsParamSupported(%s) failed: %#lx, expected DMUS_E_TYPE_UNSUPPORTED\n",
param_types[j].name, hr);
if (class[i].clsid == &CLSID_DirectMusicChordTrack) {
expect_setparam(dmt8, param_types[j].type, param_types[j].name,
@@ -410,53 +410,53 @@ static void test_track(void)
if (class[i].clsid == &CLSID_DirectMusicMuteTrack) {
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
} else todo_wine {
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
}
todo_wine {
hr = IDirectMusicTrack8_Clone(dmt8, 0, 0, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %#lx\n", hr);
hr = IDirectMusicTrack8_PlayEx(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_GetParamEx(dmt8, NULL, 0, NULL, NULL, NULL, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_GetParamEx failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_GetParamEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_SetParamEx(dmt8, NULL, 0, NULL, NULL, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_SetParamEx failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_SetParamEx failed: %#lx\n", hr);
}
hr = IDirectMusicTrack8_Compose(dmt8, NULL, 0, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %#lx\n", hr);
if (class[i].has_join) {
hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
} else {
hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
}
/* IPersistStream */
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &classid);
- ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&classid, class[i].clsid),
"Expected class %s got %s\n", class[i].name, wine_dbgstr_guid(&classid));
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
if (class[i].has_save)
- ok(hr == E_POINTER, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IPersistStream_Save failed: %#lx\n", hr);
else
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicTrack8_Release(dmt8));
}
@@ -570,12 +570,12 @@ static void test_parsedescriptor(void)
hr = CoCreateInstance(&CLSID_DirectMusicStyle, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void **)&dmo);
- ok(hr == S_OK, "DirectMusicStyle create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicStyle create failed: %#lx, expected S_OK\n", hr);
/* Nothing loaded */
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData & DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData & DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicStyle),
"Got class guid %s, expected CLSID_DirectMusicStyle\n",
@@ -585,8 +585,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(empty);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicStyle),
"Got class guid %s, expected CLSID_DirectMusicStyle\n",
@@ -596,25 +596,25 @@ static void test_parsedescriptor(void)
/* NULL pointers */
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &desc);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, NULL);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
/* Wrong form */
empty[1] = DMUS_FOURCC_CONTAINER_FORM;
stream = gen_riff_stream(empty);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == DMUS_E_CHUNKNOTFOUND,
- "ParseDescriptor failed: %08x, expected DMUS_E_CHUNKNOTFOUND\n", hr);
+ "ParseDescriptor failed: %#lx, expected DMUS_E_CHUNKNOTFOUND\n", hr);
IStream_Release(stream);
/* All desc chunks, DMUS_OBJ_CATEGORY not supported */
stream = gen_riff_stream(alldesc);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
valid = DMUS_OBJ_OBJECT|DMUS_OBJ_CLASS|DMUS_OBJ_NAME|DMUS_OBJ_VERSION;
- ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
+ ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicStyle),
"Got class guid %s, expected CLSID_DirectMusicStyle\n",
wine_dbgstr_guid(&desc.guidClass));
@@ -629,9 +629,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_NAME),
- "Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
wine_dbgstr_w(desc.wszName));
IStream_Release(stream);
@@ -641,8 +641,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
IStream_Release(stream);
@@ -650,9 +650,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(dupes);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
valid = DMUS_OBJ_OBJECT|DMUS_OBJ_CLASS|DMUS_OBJ_NAME|DMUS_OBJ_VERSION;
- ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
+ ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
wine_dbgstr_w(desc.wszName));
IStream_Release(stream);
--
2.34.1
1
0
10 Feb '22
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmscript/tests/Makefile.in | 1 -
dlls/dmscript/tests/dmscript.c | 109 ++++++++++++++++----------------
2 files changed, 54 insertions(+), 56 deletions(-)
diff --git a/dlls/dmscript/tests/Makefile.in b/dlls/dmscript/tests/Makefile.in
index 5cc5553e2ca..a4b246d0931 100644
--- a/dlls/dmscript/tests/Makefile.in
+++ b/dlls/dmscript/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmscript.dll
IMPORTS = ole32
diff --git a/dlls/dmscript/tests/dmscript.c b/dlls/dmscript/tests/dmscript.c
index 30b64d5788d..f3ae2c940d2 100644
--- a/dlls/dmscript/tests/dmscript.c
+++ b/dlls/dmscript/tests/dmscript.c
@@ -94,37 +94,37 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusicScript, &unk_obj.IUnknown_iface, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&unk_obj.inner_unk);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicScript create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicScript create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!unk_obj.inner_unk, "unk_obj.inner_unk = %p\n", unk_obj.inner_unk);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
(void**)&dms);
- ok(hr == E_NOINTERFACE, "DirectMusicScript create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicScript create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicScript interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicScript, (void**)&dms);
- ok(hr == S_OK, "DirectMusicScript create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScript create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicScript_AddRef(dms);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicScript_QueryInterface(dms, &IID_IDirectMusicObject, (void**)&dmo);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicScript_QueryInterface(dms, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IPersistStream_Release(ps);
hr = IDirectMusicScript_QueryInterface(dms, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicScript_Release(dms));
@@ -143,32 +143,31 @@ static void test_COM_scripttrack(void)
hr = CoCreateInstance(&CLSID_DirectMusicScriptTrack, &unk_obj.IUnknown_iface,
CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&unk_obj.inner_unk);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicScriptTrack create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicScriptTrack create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!unk_obj.inner_unk, "unk_obj.inner_unk = %p\n", unk_obj.inner_unk);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicScriptTrack, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmt);
- ok(hr == E_NOINTERFACE, "DirectMusicScriptTrack create failed: %08x, expected E_NOINTERFACE\n",
- hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicScriptTrack create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicScriptTrack interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicScriptTrack, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicTrack, (void**)&dmt);
- ok(hr == S_OK, "DirectMusicScriptTrack create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScriptTrack create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicTrack_AddRef(dmt);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IPersistStream_Release(ps);
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicTrack_Release(dmt));
@@ -184,19 +183,19 @@ static void test_dmscript(void)
hr = CoCreateInstance(&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicScript, (void**)&dms);
- ok(hr == S_OK, "DirectMusicScript create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScript create failed: %#lx, expected S_OK\n", hr);
/* Unimplemented IPersistStream methods */
hr = IDirectMusicScript_QueryInterface(dms, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
- ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %#lx\n", hr);
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicScript_Release(dms));
}
@@ -249,67 +248,67 @@ static void test_scripttrack(void)
hr = CoCreateInstance(&CLSID_DirectMusicScriptTrack, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicTrack8, (void**)&dmt);
- ok(hr == S_OK, "DirectMusicScriptTrack create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScriptTrack create failed: %#lx, expected S_OK\n", hr);
/* IDirectMusicTrack8 */
todo_wine {
hr = IDirectMusicTrack8_Init(dmt, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %#lx\n", hr);
hr = IDirectMusicTrack8_InitPlay(dmt, NULL, NULL, NULL, 0, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
hr = IDirectMusicTrack8_EndPlay(dmt, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_EndPlay failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_EndPlay failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Play(dmt, NULL, 0, 0, 0, 0, NULL, NULL, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_Play failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_Play failed: %#lx\n", hr);
}
hr = IDirectMusicTrack8_GetParam(dmt, NULL, 0, NULL, NULL);
- ok(hr == DMUS_E_GET_UNSUPPORTED, "IDirectMusicTrack8_GetParam failed: %08x\n", hr);
+ ok(hr == DMUS_E_GET_UNSUPPORTED, "IDirectMusicTrack8_GetParam failed: %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(unsupported); i++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt, unsupported[i].type);
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
- "IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
+ "IsParamSupported(%s) failed: %#lx, expected DMUS_E_TYPE_UNSUPPORTED\n",
unsupported[i].name, hr);
hr = IDirectMusicTrack8_GetParam(dmt, unsupported[i].type, 0, NULL, buf);
ok(hr == DMUS_E_GET_UNSUPPORTED,
- "GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n",
+ "GetParam(%s) failed: %#lx, expected DMUS_E_GET_UNSUPPORTED\n",
unsupported[i].name, hr);
hr = IDirectMusicTrack8_SetParam(dmt, unsupported[i].type, 0, buf);
ok(hr == DMUS_E_SET_UNSUPPORTED,
- "SetParam(%s) failed: %08x, expected DMUS_E_SET_UNSUPPORTED\n",
+ "SetParam(%s) failed: %#lx, expected DMUS_E_SET_UNSUPPORTED\n",
unsupported[i].name, hr);
}
hr = IDirectMusicTrack8_AddNotificationType(dmt, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_RemoveNotificationType(dmt, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Clone(dmt, 0, 0, NULL);
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %#lx\n", hr);
hr = IDirectMusicTrack8_PlayEx(dmt, NULL, 0, 0, 0, 0, NULL, NULL, 0);
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Compose(dmt, NULL, 0, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Join(dmt, NULL, 0, NULL, 0, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
/* IPersistStream */
hr = IDirectMusicTrack8_QueryInterface(dmt, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "got %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
- ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&class, &CLSID_DirectMusicScriptTrack),
"Expected class CLSID_DirectMusicScriptTrack got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicTrack8_Release(dmt));
}
@@ -370,41 +369,41 @@ static void test_parsedescriptor(void)
hr = CoCreateInstance(&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void **)&dmo);
- ok(hr == S_OK, "DirectMusicScript create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScript create failed: %#lx, expected S_OK\n", hr);
/* Nothing loaded */
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
todo_wine ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_VERSION),
- "Got valid data %#x, expected DMUS_OBJ_OBJECT | DMUS_OBJ_VERSION\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_OBJECT | DMUS_OBJ_VERSION\n", desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicScript),
"Got class guid %s, expected CLSID_DirectMusicScript\n",
wine_dbgstr_guid(&desc.guidClass));
ok(!desc.vVersion.dwVersionMS && !desc.vVersion.dwVersionLS,
- "Got DMUS_VERSION %u.%u, expected 0.0\n", desc.vVersion.dwVersionMS,
+ "Got DMUS_VERSION %lu.%lu, expected 0.0\n", desc.vVersion.dwVersionMS,
desc.vVersion.dwVersionLS);
/* Empty RIFF stream */
stream = gen_riff_stream(empty);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(!desc.dwValidData, "Got valid data %#x, expected 0\n", desc.dwValidData);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(!desc.dwValidData, "Got valid data %#lx, expected 0\n", desc.dwValidData);
IStream_Release(stream);
/* NULL pointers */
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &desc);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, NULL);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
/* Wrong form */
empty[1] = DMUS_FOURCC_CONTAINER_FORM;
stream = gen_riff_stream(empty);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == DMUS_E_SCRIPT_INVALID_FILE,
- "ParseDescriptor failed: %08x, expected DMUS_E_SCRIPT_INVALID_FILE\n", hr);
+ "ParseDescriptor failed: %#lx, expected DMUS_E_SCRIPT_INVALID_FILE\n", hr);
IStream_Release(stream);
IDirectMusicObject_Release(dmo);
--
2.34.1
1
0
10 Feb '22
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmloader/tests/Makefile.in | 1 -
dlls/dmloader/tests/loader.c | 28 ++++++++++++++--------------
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/dlls/dmloader/tests/Makefile.in b/dlls/dmloader/tests/Makefile.in
index 8eef83551d4..d8be1bce3e4 100644
--- a/dlls/dmloader/tests/Makefile.in
+++ b/dlls/dmloader/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmloader.dll
IMPORTS = ole32
diff --git a/dlls/dmloader/tests/loader.c b/dlls/dmloader/tests/loader.c
index 418a4ebb7a5..01f9fb435fd 100644
--- a/dlls/dmloader/tests/loader.c
+++ b/dlls/dmloader/tests/loader.c
@@ -266,12 +266,12 @@ static void test_COM(void)
&IID_IDirectMusicLoader8, (void**)&dml8);
ok(hr == S_OK, "DirectMusicLoader create failed: %08x, expected S_OK\n", hr);
refcount = IDirectMusicLoader8_AddRef(dml8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicLoader8_QueryInterface(dml8, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicLoader8_Release(dml8));
@@ -303,24 +303,24 @@ static void test_COM_container(void)
&IID_IDirectMusicContainer, (void**)&dmc);
ok(hr == S_OK, "DirectMusicContainer create failed: %08x, expected S_OK\n", hr);
refcount = IDirectMusicContainer_AddRef(dmc);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicContainer_QueryInterface(dmc, &IID_IDirectMusicObject, (void**)&dmo);
ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicContainer_QueryInterface(dmc, &IID_IPersistStream, (void**)&ps);
ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IPersistStream_Release(ps);
hr = IDirectMusicContainer_QueryInterface(dmc, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicContainer_Release(dmc));
@@ -355,13 +355,13 @@ static void test_container(void)
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %08x\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS,
- "Fresh object has more valid data (%08x) than DMUS_OBJ_CLASS\n", desc.dwValidData);
+ "Fresh object has more valid data (%#lx) than DMUS_OBJ_CLASS\n", desc.dwValidData);
/* DMUS_OBJ_CLASS is immutable */
desc.dwValidData = DMUS_OBJ_CLASS;
desc.dwSize = 1; /* size is ignored */
hr = IDirectMusicObject_SetDescriptor(dmo, &desc);
ok(hr == S_FALSE , "IDirectMusicObject_SetDescriptor failed: %08x\n", hr);
- ok(!desc.dwValidData, "dwValidData wasn't cleared: %08x\n", desc.dwValidData);
+ ok(!desc.dwValidData, "dwValidData wasn't cleared: %#lx\n", desc.dwValidData);
desc.dwValidData = DMUS_OBJ_CLASS;
desc.guidClass = CLSID_DirectMusicSegment;
hr = IDirectMusicObject_SetDescriptor(dmo, &desc);
@@ -509,7 +509,7 @@ static void test_parsedescriptor(void)
ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS /* XP */ ||
broken(desc.dwValidData == (DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS)), /* Vista and above */
- "Got valid data %#x, expected DMUS_OBJ_OBJECT\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_OBJECT\n", desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicContainer),
"Got class guid %s, expected CLSID_DirectMusicContainer\n",
wine_dbgstr_guid(&desc.guidClass));
@@ -522,7 +522,7 @@ static void test_parsedescriptor(void)
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicContainer),
"Got class guid %s, expected CLSID_DirectMusicContainer\n",
@@ -555,7 +555,7 @@ static void test_parsedescriptor(void)
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
valid = DMUS_OBJ_OBJECT|DMUS_OBJ_CLASS|DMUS_OBJ_NAME|DMUS_OBJ_CATEGORY|DMUS_OBJ_VERSION;
- ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
+ ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicContainer),
"Got class guid %s, expected CLSID_DirectMusicContainer\n",
wine_dbgstr_guid(&desc.guidClass));
@@ -572,7 +572,7 @@ static void test_parsedescriptor(void)
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
IStream_Release(stream);
@@ -583,7 +583,7 @@ static void test_parsedescriptor(void)
desc.dwSize = sizeof(desc);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
IStream_Release(stream);
@@ -594,7 +594,7 @@ static void test_parsedescriptor(void)
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
valid = DMUS_OBJ_OBJECT|DMUS_OBJ_CLASS|DMUS_OBJ_NAME|DMUS_OBJ_CATEGORY|DMUS_OBJ_VERSION;
- ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
+ ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
ok(!lstrcmpW(desc.wszName, L"UNAM"), "Got name '%s', expected 'UNAM'\n",
wine_dbgstr_w(desc.wszName));
IStream_Release(stream);
--
2.34.1
1
0
[PATCH 1/2] server: Always place compiler barrier before atomic memory stores.
by Jinoh Kang 10 Feb '22
by Jinoh Kang 10 Feb '22
10 Feb '22
GCC, clang, and other compilers do not actually provide acquire/release
semantics on volatile memory accesses. This is also true on MSVC with
the /volatile:iso (use strict ISO C semantics for volatile accesses)
flag.
Consider the following test program:
void func(int *foo, volatile int *bar)
{
*foo = 1;
*bar = 2; /* NOTE: *not* immune to reordering! */
*foo = 3;
}
After store reordering and dead code removal, the function above
compiles into the following x86-64 assembly on GCC 11.2 (gcc -O2):
movl $2, (%rsi)
movl $3, (%rdi)
ret
Note that the first write to "*foo" has been ellided; the compiler
decided that it is safe to reorder writes to "*foo" around writes to the
volatile variable "*bar", so it simply merged the first "*foo" write
into the second one.
Fix this by explicitly specifying a compiler memory barrier before the
atomic store. As a workaround for GCC bug #81316, we do this even for
other architectures where we explicitly use the atomic memory access
builtin.
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
server/fd.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/server/fd.c b/server/fd.c
index 1b4b98b0e76..5865db89c33 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -381,10 +381,15 @@ static const int user_shared_data_timeout = 16;
static void atomic_store_ulong(volatile ULONG *ptr, ULONG value)
{
- /* on x86 there should be total store order guarantees, so volatile is
- * enough to ensure the stores aren't reordered by the compiler, and then
- * they will always be seen in-order from other CPUs. On other archs, we
- * need atomic intrinsics to guarantee that. */
+ /* on x86 there should be total store order guarantees, so a compiler
+ * barrier is enough to ensure the stores aren't reordered by the compiler;
+ * then, they will always be seen in-order from other CPUs. On other archs,
+ * we need atomic intrinsics to guarantee that.
+ *
+ * even when using atomic intrinsics, we explicitly place a memory barrier
+ * to work around GCC bug #81316 (affects all GCC versions prior to 7.x).
+ */
+ __asm__ __volatile__("" ::: "memory");
#if defined(__i386__) || defined(__x86_64__)
*ptr = value;
#else
@@ -394,6 +399,10 @@ static void atomic_store_ulong(volatile ULONG *ptr, ULONG value)
static void atomic_store_long(volatile LONG *ptr, LONG value)
{
+ /* even when using atomic intrinsics, we explicitly place a memory barrier
+ * to work around GCC bug #81316 (affects all GCC versions prior to 7.x).
+ */
+ __asm__ __volatile__("" ::: "memory");
#if defined(__i386__) || defined(__x86_64__)
*ptr = value;
#else
--
2.34.1
4
9
>From 10392f7f4f469f266016542b1d3c0b7d39d59bbc Mon Sep 17 00:00:00 2001
From: Dean M Greer <gcenx83(a)gmail.com>
Date: Sun, 23 Jan 2022 13:58:38 -0500
Subject: [PATCH] winemac.drv: fix compile with pre macOS 10.12 SDKs
Fixes a regression introduced by
https://source.winehq.org/git/wine.git/commit/e58b1a2b395b56859157e7dd8d08c…
Signed-off-by: Dean M Greer <gcenx83(a)gmail.com>
---
dlls/winemac.drv/cocoa_app.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/winemac.drv/cocoa_app.h b/dlls/winemac.drv/cocoa_app.h
index e5caad00a870..52c91c0621f1 100644
--- a/dlls/winemac.drv/cocoa_app.h
+++ b/dlls/winemac.drv/cocoa_app.h
@@ -56,6 +56,7 @@
#define NSWindowStyleMaskResizable NSResizableWindowMask
#define NSWindowStyleMaskTitled NSTitledWindowMask
#define NSWindowStyleMaskUtilityWindow NSUtilityWindowMask
+#define NSWindowStyleMaskNonactivatingPanel NSNonactivatingPanelMask
#endif
#define ERR(...) do { if (macdrv_err_on) LogError(__func__, __VA_ARGS__);
} while (false)
--
4
5