winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
March 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
996 discussions
Start a n
N
ew thread
Alexandre Julliard : kernelbase: Implement IsValidNLSVersion().
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: 84cca2baae23c6afa0c8070f5009fdcfa218e039 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=84cca2baae23c6afa0c8070f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 20 14:43:45 2020 +0100 kernelbase: Implement IsValidNLSVersion(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/tests/locale.c | 80 +++++++++++++++++++++++++++++++++++++++++ dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/locale.c | 33 +++++++++++++++++ include/winnls.h | 1 + 5 files changed, 116 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 1cccaf2209..2e2f7c9a84 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -995,6 +995,7 @@ @ stdcall -import IsValidLanguageGroup(long long) @ stdcall -import IsValidLocale(long long) @ stdcall -import IsValidLocaleName(wstr) +@ stdcall -import IsValidNLSVersion(long wstr ptr) # @ stub IsValidUILanguage @ stdcall -import IsWow64Process(ptr ptr) @ stdcall K32EmptyWorkingSet(long) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 3f755aa2b9..4c1e1b4d73 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -87,6 +87,7 @@ static INT (WINAPI *pNormalizeString)(NORM_FORM, LPCWSTR, INT, LPWSTR, INT); static INT (WINAPI *pFindStringOrdinal)(DWORD, LPCWSTR lpStringSource, INT, LPCWSTR, INT, BOOL); static BOOL (WINAPI *pGetNLSVersion)(NLS_FUNCTION,LCID,NLSVERSIONINFO*); static BOOL (WINAPI *pGetNLSVersionEx)(NLS_FUNCTION,LPCWSTR,NLSVERSIONINFOEX*); +static DWORD (WINAPI *pIsValidNLSVersion)(NLS_FUNCTION,LPCWSTR,NLSVERSIONINFOEX*); static NTSTATUS (WINAPI *pRtlNormalizeString)(ULONG, LPCWSTR, INT, LPWSTR, INT*); static NTSTATUS (WINAPI *pRtlIsNormalizedString)(ULONG, LPCWSTR, INT, BOOLEAN*); static NTSTATUS (WINAPI *pNtGetNlsSectionPtr)(ULONG,ULONG,void*,void**,SIZE_T*); @@ -129,6 +130,7 @@ static void InitFunctionPointers(void) X(FindStringOrdinal); X(GetNLSVersion); X(GetNLSVersionEx); + X(IsValidNLSVersion); mod = GetModuleHandleA("ntdll"); X(RtlUpcaseUnicodeChar); @@ -6763,6 +6765,84 @@ static void test_NLSVersion(void) else ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); } else win_skip( "GetNLSVersionEx not available\n" ); + + if (pIsValidNLSVersion) + { + info.dwNLSVersionInfoSize = sizeof(info); + pGetNLSVersion( COMPARE_STRING, LOCALE_USER_DEFAULT, (NLSVERSIONINFO *)&info ); + + SetLastError( 0xdeadbeef ); + info.dwNLSVersionInfoSize = sizeof(info); + ret = pIsValidNLSVersion( COMPARE_STRING, L"ja-JP", &info ); + ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + info.dwNLSVersionInfoSize = offsetof( NLSVERSIONINFO, dwEffectiveId ); + ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); + ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + info.dwNLSVersionInfoSize = sizeof(info); + ret = pIsValidNLSVersion( 2, L"en-US", &info ); + ok( !ret, "IsValidNLSVersion succeeded\n" ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + info.dwNLSVersionInfoSize = sizeof(info); + ret = pIsValidNLSVersion( COMPARE_STRING, L"foobar", &info ); + ok( !ret, "IsValidNLSVersion succeeded\n" ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + + SetLastError( 0xdeadbeef ); + memset( &info, 0xcc, sizeof(info) ); + info.dwNLSVersionInfoSize = sizeof(info); + ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); + ok( !ret, "IsValidNLSVersion succeeded\n" ); + ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() ); + + info.dwNLSVersionInfoSize = sizeof(info); + pGetNLSVersion( COMPARE_STRING, LOCALE_USER_DEFAULT, (NLSVERSIONINFO *)&info ); + info.dwNLSVersion++; + SetLastError( 0xdeadbeef ); + ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); + ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + + info.dwNLSVersion += 0x100; + SetLastError( 0xdeadbeef ); + ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); + ok( !ret, "IsValidNLSVersion succeeded\n" ); + ok( GetLastError() == 0, "wrong error %u\n", GetLastError() ); + + info.dwNLSVersion -= 0x200; + SetLastError( 0xdeadbeef ); + ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); + ok( !ret, "IsValidNLSVersion succeeded\n" ); + ok( GetLastError() == 0, "wrong error %u\n", GetLastError() ); + + info.dwNLSVersion += 0x100; + info.dwDefinedVersion += 0x100; + SetLastError( 0xdeadbeef ); + ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); + ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + + info.dwDefinedVersion -= 0x100; + info.guidCustomVersion.Data1 = 0x123; + SetLastError( 0xdeadbeef ); + ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); + ok( !ret, "IsValidNLSVersion succeeded\n" ); + ok( GetLastError() == 0, "wrong error %u\n", GetLastError() ); + + info.guidCustomVersion = guid_null; + SetLastError( 0xdeadbeef ); + ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); + ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + } + else win_skip( "IsValidNLSVersion not available\n" ); } START_TEST(locale) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index fbcae55e98..d74f65c8f1 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -878,7 +878,7 @@ @ stdcall IsValidLanguageGroup(long long) @ stdcall IsValidLocale(long long) @ stdcall IsValidLocaleName(wstr) -# @ stub IsValidNLSVersion +@ stdcall IsValidNLSVersion(long wstr ptr) @ stub IsValidRelativeSecurityDescriptor @ stdcall IsValidSecurityDescriptor(ptr) @ stdcall IsValidSid(ptr) diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c index b9a53b0ef3..623cb01280 100644 --- a/dlls/kernelbase/locale.c +++ b/dlls/kernelbase/locale.c @@ -4860,6 +4860,39 @@ BOOL WINAPI DECLSPEC_HOTPATCH IsValidLocaleName( const WCHAR *locale ) } +/****************************************************************************** + * IsValidNLSVersion (kernelbase.@) + */ +DWORD WINAPI DECLSPEC_HOTPATCH IsValidNLSVersion( NLS_FUNCTION func, const WCHAR *locale, + NLSVERSIONINFOEX *info ) +{ + static const GUID GUID_NULL; + NLSVERSIONINFOEX infoex; + DWORD ret; + + if (func != COMPARE_STRING) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } + if (info->dwNLSVersionInfoSize < sizeof(*info) && + (info->dwNLSVersionInfoSize != offsetof( NLSVERSIONINFO, dwEffectiveId ))) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } + infoex.dwNLSVersionInfoSize = sizeof(infoex); + if (!GetNLSVersionEx( func, locale, &infoex )) return FALSE; + + ret = (infoex.dwNLSVersion & ~0xff) == (info->dwNLSVersion & ~0xff); + if (ret && !IsEqualGUID( &info->guidCustomVersion, &GUID_NULL )) + ret = find_sortguid( &info->guidCustomVersion ) != NULL; + + if (!ret) SetLastError( ERROR_SUCCESS ); + return ret; +} + + /*********************************************************************** * LCIDToLocaleName (kernelbase.@) */ diff --git a/include/winnls.h b/include/winnls.h index e563968cf9..e7b478b1c6 100644 --- a/include/winnls.h +++ b/include/winnls.h @@ -957,6 +957,7 @@ WINBASEAPI BOOL WINAPI IsValidCodePage(UINT); WINBASEAPI BOOL WINAPI IsValidLanguageGroup(LGRPID,DWORD); WINBASEAPI BOOL WINAPI IsValidLocale(LCID,DWORD); WINBASEAPI BOOL WINAPI IsValidLocaleName(LPCWSTR); +WINBASEAPI DWORD WINAPI IsValidNLSVersion(NLS_FUNCTION,LPCWSTR,NLSVERSIONINFOEX*); WINBASEAPI INT WINAPI LCIDToLocaleName(LCID,LPWSTR,INT,DWORD); WINBASEAPI INT WINAPI LCMapStringA(LCID,DWORD,LPCSTR,INT,LPSTR,INT); WINBASEAPI INT WINAPI LCMapStringW(LCID,DWORD,LPCWSTR,INT,LPWSTR,INT);
1
0
0
0
Alexandre Julliard : kernelbase: Implement GetNLSVersion/GetNLSVersionEx().
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: 86522976c9d5d9f7222ba731c2bd7c0435496f6d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=86522976c9d5d9f7222ba731…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 20 12:54:36 2020 +0100 kernelbase: Implement GetNLSVersion/GetNLSVersionEx(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/kernel32.spec | 4 +- dlls/kernel32/tests/locale.c | 133 ++++++++++++++++++++++++++++++++++++++++ dlls/kernelbase/kernelbase.spec | 4 +- dlls/kernelbase/locale.c | 54 ++++++++++++++++ include/winnls.h | 7 +++ 5 files changed, 198 insertions(+), 4 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=86522976c9d5d9f7222b…
1
0
0
0
Bernhard Übelacker : ws2_32: Add stub implementation for WSCGetProviderInfo.
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: 3795484e81d65b6eed512c5d8983b89f4c5a0974 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3795484e81d65b6eed512c5d…
Author: Bernhard Übelacker <bernhardu(a)mailbox.org> Date: Thu Mar 19 22:32:16 2020 +0100 ws2_32: Add stub implementation for WSCGetProviderInfo. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48765
Signed-off-by: Bernhard Übelacker <bernhardu(a)mailbox.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 21 +++++++++++++++++++++ dlls/ws2_32/tests/sock.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/ws2_32/ws2_32.spec | 1 + include/ws2spi.h | 7 +++++++ 4 files changed, 76 insertions(+) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index c284f595ab..5b62767795 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -9001,6 +9001,27 @@ INT WINAPI WSCEnableNSProvider( LPGUID provider, BOOL enable ) return 0; } +/*********************************************************************** + * WSCGetProviderInfo + */ +INT WINAPI WSCGetProviderInfo( LPGUID provider, WSC_PROVIDER_INFO_TYPE info_type, + PBYTE info, size_t* len, DWORD flags, LPINT errcode ) +{ + FIXME( "(%s 0x%08x %p %p 0x%08x %p) Stub!\n", + debugstr_guid(provider), info_type, info, len, flags, errcode ); + + if (!errcode) + return SOCKET_ERROR; + + if (!provider) { + *errcode = WSAEFAULT; + return SOCKET_ERROR; + } + + *errcode = WSANO_RECOVERY; + return SOCKET_ERROR; +} + /*********************************************************************** * WSCGetProviderPath (WS2_32.86) */ diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 60c5dfc63f..b17f076a40 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -27,6 +27,7 @@ #include <windows.h> #include <winternl.h> #include <ws2tcpip.h> +#include <ws2spi.h> #include <wsipx.h> #include <wsnwlink.h> #include <mswsock.h> @@ -84,6 +85,7 @@ static int (WINAPI *pWSALookupServiceNextW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSET static int (WINAPI *pWSAEnumNameSpaceProvidersA)(LPDWORD,LPWSANAMESPACE_INFOA); static int (WINAPI *pWSAEnumNameSpaceProvidersW)(LPDWORD,LPWSANAMESPACE_INFOW); static int (WINAPI *pWSAPoll)(WSAPOLLFD *,ULONG,INT); +static int (WINAPI *pWSCGetProviderInfo)(LPGUID,WSC_PROVIDER_INFO_TYPE,PBYTE,size_t*,DWORD,LPINT); /* Function pointers from iphlpapi */ static DWORD (WINAPI *pGetAdaptersInfo)(PIP_ADAPTER_INFO,PULONG); @@ -1300,6 +1302,7 @@ static void Init (void) pWSAEnumNameSpaceProvidersA = (void *)GetProcAddress(hws2_32, "WSAEnumNameSpaceProvidersA"); pWSAEnumNameSpaceProvidersW = (void *)GetProcAddress(hws2_32, "WSAEnumNameSpaceProvidersW"); pWSAPoll = (void *)GetProcAddress(hws2_32, "WSAPoll"); + pWSCGetProviderInfo = (void *)GetProcAddress(hws2_32, "WSCGetProviderInfo"); hiphlpapi = LoadLibraryA("iphlpapi.dll"); if (hiphlpapi) @@ -11597,6 +11600,48 @@ static void test_iocp(void) closesocket(dst); } +static void test_WSCGetProviderInfo(void) +{ + int ret; + int errcode; + GUID provider = {}; + char info[1]; + size_t len = 0; + + if (!pWSCGetProviderInfo) { + skip("WSCGetProviderInfo is not available.\n"); + return; + } + + ret = pWSCGetProviderInfo(NULL, -1, NULL, NULL, 0, NULL); + ok(ret == SOCKET_ERROR, "got %d, expected SOCKET_ERROR\n", ret); + + errcode = 0xdeadbeef; + ret = pWSCGetProviderInfo(NULL, ProviderInfoLspCategories, (PBYTE)&info, &len, 0, &errcode); + ok(ret == SOCKET_ERROR, "got %d, expected SOCKET_ERROR\n", ret); + ok(errcode == WSAEFAULT, "got %d, expected WSAEFAULT\n", errcode); + + errcode = 0xdeadbeef; + ret = pWSCGetProviderInfo(&provider, -1, (PBYTE)&info, &len, 0, &errcode); + ok(ret == SOCKET_ERROR, "got %d, expected SOCKET_ERROR\n", ret); + ok(errcode == WSANO_RECOVERY, "got %d, expected WSANO_RECOVERY\n", errcode); + + errcode = 0xdeadbeef; + ret = pWSCGetProviderInfo(&provider, ProviderInfoLspCategories, NULL, &len, 0, &errcode); + ok(ret == SOCKET_ERROR, "got %d, expected SOCKET_ERROR\n", ret); + ok(errcode == WSANO_RECOVERY, "got %d, expected WSANO_RECOVERY\n", errcode); + + errcode = 0xdeadbeef; + ret = pWSCGetProviderInfo(&provider, ProviderInfoLspCategories, (PBYTE)&info, NULL, 0, &errcode); + ok(ret == SOCKET_ERROR, "got %d, expected SOCKET_ERROR\n", ret); + ok(errcode == WSANO_RECOVERY, "got %d, expected WSANO_RECOVERY\n", errcode); + + errcode = 0xdeadbeef; + ret = pWSCGetProviderInfo(&provider, ProviderInfoLspCategories, (PBYTE)&info, &len, 0, &errcode); + ok(ret == SOCKET_ERROR, "got %d, expected SOCKET_ERROR\n", ret); + ok(errcode == WSANO_RECOVERY, "got %d, expected WSANO_RECOVERY\n", errcode); +} + START_TEST( sock ) { int i; @@ -11681,6 +11726,8 @@ START_TEST( sock ) test_completion_port(); test_address_list_query(); + test_WSCGetProviderInfo(); + /* this is an io heavy test, do it at the end so the kernel doesn't start dropping packets */ test_send(); test_synchronous_WSAIoctl(); diff --git a/dlls/ws2_32/ws2_32.spec b/dlls/ws2_32/ws2_32.spec index 37b02e5712..d3c1e6214a 100644 --- a/dlls/ws2_32/ws2_32.spec +++ b/dlls/ws2_32/ws2_32.spec @@ -117,6 +117,7 @@ @ stdcall WSCDeinstallProvider(ptr ptr) @ stdcall WSCEnableNSProvider(ptr long) @ stdcall WSCEnumProtocols(ptr ptr ptr ptr) +@ stdcall WSCGetProviderInfo(ptr long ptr ptr long ptr) @ stdcall WSCGetProviderPath(ptr ptr ptr ptr) @ stdcall WSCInstallNameSpace(wstr wstr long long ptr) @ stdcall WSCInstallProvider(ptr wstr ptr long ptr) diff --git a/include/ws2spi.h b/include/ws2spi.h index 3d2ca84dfa..a399afe6f2 100644 --- a/include/ws2spi.h +++ b/include/ws2spi.h @@ -33,12 +33,19 @@ extern "C" { typedef BOOL (WINAPI *LPWPUPOSTMESSAGE)(HWND,UINT,WPARAM,LPARAM); +typedef enum _WSC_PROVIDER_INFO_TYPE +{ + ProviderInfoLspCategories, + ProviderInfoAudit, +} WSC_PROVIDER_INFO_TYPE; + WSAEVENT WINAPI WPUCompleteOverlappedRequest(SOCKET,LPWSAOVERLAPPED,DWORD,DWORD,LPINT); INT WINAPI WSCInstallProvider(const LPGUID,LPCWSTR,const LPWSAPROTOCOL_INFOW, DWORD,LPINT); INT WINAPI WSCDeinstallProvider(LPGUID,LPINT); INT WINAPI WSCEnableNSProvider(LPGUID,BOOL); INT WINAPI WSCEnumProtocols(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD,LPINT); +INT WINAPI WSCGetProviderInfo(LPGUID,WSC_PROVIDER_INFO_TYPE,PBYTE,size_t*,DWORD,LPINT); INT WINAPI WSCGetProviderPath(LPGUID,LPWSTR,LPINT,LPINT); INT WINAPI WSCInstallNameSpace(LPWSTR,LPWSTR,DWORD,DWORD,LPGUID); INT WINAPI WSCSetApplicationCategory(LPCWSTR,DWORD,LPCWSTR,DWORD,DWORD,DWORD*,LPINT);
1
0
0
0
Zebediah Figura : quartz/vmr9: Create textures with D3DUSAGE_DYNAMIC.
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: ef23e618a0fbf1eeb41865e8e182a78969642379 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef23e618a0fbf1eeb41865e8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 19 18:50:55 2020 -0500 quartz/vmr9: Create textures with D3DUSAGE_DYNAMIC. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 2 +- dlls/quartz/vmr9.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 45898db111..1194fd8d17 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -2508,7 +2508,7 @@ static void test_allocate_surface_helper(void) ok(hr == D3D_OK, "Got hr %#x.\n", hr); ok(desc.Format == info.Format, "Got format %#x.\n", desc.Format); ok(desc.Type == D3DRTYPE_SURFACE, "Got type %u.\n", desc.Type); - todo_wine ok(desc.Usage == D3DUSAGE_DYNAMIC, "Got usage %#x.\n", desc.Usage); + ok(desc.Usage == D3DUSAGE_DYNAMIC, "Got usage %#x.\n", desc.Usage); ok(desc.Pool == D3DPOOL_DEFAULT, "Got pool %u.\n", desc.Pool); ok(desc.MultiSampleType == D3DMULTISAMPLE_NONE, "Got multisample type %u.\n", desc.MultiSampleType); ok(!desc.MultiSampleQuality, "Got multisample quality %u.\n", desc.MultiSampleQuality); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 0aa861c3a6..b2217547cd 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2138,7 +2138,7 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa { IDirect3DTexture9 *texture; - hr = IDirect3DDevice9_CreateTexture(This->allocator_d3d9_dev, allocinfo->dwWidth, allocinfo->dwHeight, 1, 0, + hr = IDirect3DDevice9_CreateTexture(This->allocator_d3d9_dev, allocinfo->dwWidth, allocinfo->dwHeight, 1, D3DUSAGE_DYNAMIC, allocinfo->Format, allocinfo->Pool, &texture, NULL); if (FAILED(hr)) break;
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for renderless mode.
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: 99207332d4ebc83ac230a2001a859c6404e495e7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=99207332d4ebc83ac230a200…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 19 18:50:54 2020 -0500 quartz/tests: Add some tests for renderless mode. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/Makefile.in | 2 +- dlls/quartz/tests/avisplit.c | 1 - dlls/quartz/tests/vmr9.c | 561 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 560 insertions(+), 4 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=99207332d4ebc83ac230…
1
0
0
0
Zebediah Figura : quartz/vmr9: Cache surfaces on connection.
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: d6a70366e10c29ff37822e093614b5e9d9f63aba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d6a70366e10c29ff37822e09…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 19 18:50:53 2020 -0500 quartz/vmr9: Cache surfaces on connection. How to Survive does not reference the IDirect3DSurface9 in IVMRSurfaceAllocator9::GetSurface(), nor does it dereference it in IVMRSurfaceAllocator9::TerminateDevice(). Native quartz only asks for each surface once, when connecting, and releases those surfaces when disconnecting, which lets these two application bugs cancel each other out. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index ab471b9042..0aa861c3a6 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -75,6 +75,7 @@ struct quartz_vmr /* Presentation related members */ IDirect3DDevice9 *allocator_d3d9_dev; HMONITOR allocator_mon; + IDirect3DSurface9 **surfaces; DWORD num_surfaces; DWORD cur_surface; DWORD_PTR cookie; @@ -312,14 +313,9 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi info.rtEnd = tStop; info.szAspectRatio.cx = This->bmiheader.biWidth; info.szAspectRatio.cy = This->bmiheader.biHeight; - - hr = IVMRSurfaceAllocatorEx9_GetSurface(This->allocator, This->cookie, (++This->cur_surface)%This->num_surfaces, 0, &info.lpSurf); - - if (FAILED(hr)) - return hr; + info.lpSurf = This->surfaces[(++This->cur_surface) % This->num_surfaces]; VMR9_SendSampleData(This, &info, pbSrcStream, cbSrcStream); - IDirect3DSurface9_Release(info.lpSurf); if (This->renderer.filter.state == State_Paused) { @@ -351,7 +347,7 @@ static HRESULT WINAPI VMR9_CheckMediaType(struct strmbase_renderer *iface, const static HRESULT initialize_device(struct quartz_vmr *filter, VMR9AllocationInfo *info) { - DWORD buffer_count = 1; + DWORD buffer_count = 1, i; HRESULT hr; if (FAILED(hr = IVMRSurfaceAllocatorEx9_InitializeDevice(filter->allocator, @@ -361,6 +357,25 @@ static HRESULT initialize_device(struct quartz_vmr *filter, VMR9AllocationInfo * return hr; } + if (!(filter->surfaces = calloc(buffer_count, sizeof(IDirect3DSurface9 *)))) + { + IVMRSurfaceAllocatorEx9_TerminateDevice(filter->allocator, filter->cookie); + return E_OUTOFMEMORY; + } + + for (i = 0; i < buffer_count; ++i) + { + if (FAILED(hr = IVMRSurfaceAllocatorEx9_GetSurface(filter->allocator, + filter->cookie, i, 0, &filter->surfaces[i]))) + { + ERR("Failed to get surface %u, hr %#x.\n", i, hr); + while (i--) + IDirect3DSurface9_Release(filter->surfaces[i]); + IVMRSurfaceAllocatorEx9_TerminateDevice(filter->allocator, filter->cookie); + return hr; + } + } + SetRect(&filter->source_rect, 0, 0, filter->bmiheader.biWidth, filter->bmiheader.biHeight); filter->num_surfaces = buffer_count; @@ -538,6 +553,7 @@ static HRESULT WINAPI VMR9_BreakConnect(struct strmbase_renderer *This) { struct quartz_vmr *pVMR9 = impl_from_IBaseFilter(&This->filter.IBaseFilter_iface); HRESULT hr = S_OK; + DWORD i; if (!pVMR9->mode) return S_FALSE; @@ -549,6 +565,10 @@ static HRESULT WINAPI VMR9_BreakConnect(struct strmbase_renderer *This) } if (pVMR9->renderer.filter.state == State_Running) hr = IVMRImagePresenter9_StopPresenting(pVMR9->presenter, pVMR9->cookie); + + for (i = 0; i < pVMR9->num_surfaces; ++i) + IDirect3DSurface9_Release(pVMR9->surfaces[i]); + free(pVMR9->surfaces); IVMRSurfaceAllocatorEx9_TerminateDevice(pVMR9->allocator, pVMR9->cookie); pVMR9->num_surfaces = 0; }
1
0
0
0
Zebediah Figura : quartz/vmr9: Request only one surface.
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: 01f83593ed7def0d8d8e69239582fdbc9cd23c52 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=01f83593ed7def0d8d8e6923…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 19 18:50:52 2020 -0500 quartz/vmr9: Request only one surface. How to Survive gets confused when we ask for more than one surface. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 35d625ddd7..ab471b9042 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -351,7 +351,7 @@ static HRESULT WINAPI VMR9_CheckMediaType(struct strmbase_renderer *iface, const static HRESULT initialize_device(struct quartz_vmr *filter, VMR9AllocationInfo *info) { - DWORD buffer_count = 2; + DWORD buffer_count = 1; HRESULT hr; if (FAILED(hr = IVMRSurfaceAllocatorEx9_InitializeDevice(filter->allocator, @@ -407,7 +407,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *filter, BOOL force, const AM_M info.dwWidth = filter->source_rect.right; info.dwHeight = filter->source_rect.bottom; info.Pool = D3DPOOL_DEFAULT; - info.MinBuffers = 2; + info.MinBuffers = 1; info.szAspectRatio.cx = info.dwWidth; info.szAspectRatio.cy = info.dwHeight; info.szNativeSize.cx = filter->bmiheader.biWidth;
1
0
0
0
Zebediah Figura : quartz/vmr9: Determine the D3D format and flags from the subtype.
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: c7393eccfaf3e2edb362b6de6cd9bd7117227eed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c7393eccfaf3e2edb362b6de…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 19 18:50:51 2020 -0500 quartz/vmr9: Determine the D3D format and flags from the subtype. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 16 +++--- dlls/quartz/vmr9.c | 127 ++++++++++++++++++++++++++++++++++------------- 2 files changed, 99 insertions(+), 44 deletions(-) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 387f4f0a93..352268dae5 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1388,17 +1388,13 @@ static void test_connect_pin(void) skip("Got E_FAIL when connecting.\n"); goto out; } - todo_wine_if (bpp_tests[j] == 24) - ok(hr == S_OK, "Got hr %#x for subtype %s and bpp %u.\n", hr, - wine_dbgstr_guid(subtype_tests[i]), bpp_tests[j]); + ok(hr == S_OK, "Got hr %#x for subtype %s and bpp %u.\n", hr, + wine_dbgstr_guid(subtype_tests[i]), bpp_tests[j]); - if (hr == S_OK) - { - hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); - } + hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IFilterGraph2_Disconnect(graph, pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); } } diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index d111057230..35d625ddd7 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -349,58 +349,117 @@ static HRESULT WINAPI VMR9_CheckMediaType(struct strmbase_renderer *iface, const return S_OK; } -static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force) +static HRESULT initialize_device(struct quartz_vmr *filter, VMR9AllocationInfo *info) { - VMR9AllocationInfo info; - DWORD buffers; + DWORD buffer_count = 2; HRESULT hr; - TRACE("my mode: %u, my window: %p, my last window: %p\n", This->mode, This->baseControlWindow.baseWindow.hWnd, This->hWndClippingWindow); - if (This->num_surfaces) + if (FAILED(hr = IVMRSurfaceAllocatorEx9_InitializeDevice(filter->allocator, + filter->cookie, info, &buffer_count))) + { + WARN("Failed to initialize device (flags %#x), hr %#x.\n", info->dwFlags, hr); + return hr; + } + + SetRect(&filter->source_rect, 0, 0, filter->bmiheader.biWidth, filter->bmiheader.biHeight); + filter->num_surfaces = buffer_count; + + return hr; +} + +static HRESULT VMR9_maybe_init(struct quartz_vmr *filter, BOOL force, const AM_MEDIA_TYPE *mt) +{ + VMR9AllocationInfo info = {}; + HRESULT hr = E_FAIL; + unsigned int i; + + static const struct + { + const GUID *subtype; + D3DFORMAT format; + DWORD flags; + } + formats[] = + { + {&MEDIASUBTYPE_ARGB1555, D3DFMT_A1R5G5B5, VMR9AllocFlag_TextureSurface}, + {&MEDIASUBTYPE_ARGB32, D3DFMT_A8R8G8B8, VMR9AllocFlag_TextureSurface}, + {&MEDIASUBTYPE_ARGB4444, D3DFMT_A4R4G4B4, VMR9AllocFlag_TextureSurface}, + + {&MEDIASUBTYPE_RGB24, D3DFMT_R8G8B8, VMR9AllocFlag_TextureSurface | VMR9AllocFlag_OffscreenSurface}, + {&MEDIASUBTYPE_RGB32, D3DFMT_X8R8G8B8, VMR9AllocFlag_TextureSurface | VMR9AllocFlag_OffscreenSurface}, + {&MEDIASUBTYPE_RGB555, D3DFMT_X1R5G5B5, VMR9AllocFlag_TextureSurface | VMR9AllocFlag_OffscreenSurface}, + {&MEDIASUBTYPE_RGB565, D3DFMT_R5G6B5, VMR9AllocFlag_TextureSurface | VMR9AllocFlag_OffscreenSurface}, + + {&MEDIASUBTYPE_NV12, MAKEFOURCC('N','V','1','2'), VMR9AllocFlag_OffscreenSurface}, + {&MEDIASUBTYPE_UYVY, D3DFMT_UYVY, VMR9AllocFlag_OffscreenSurface}, + {&MEDIASUBTYPE_YUY2, D3DFMT_YUY2, VMR9AllocFlag_OffscreenSurface}, + {&MEDIASUBTYPE_YV12, MAKEFOURCC('Y','V','1','2'), VMR9AllocFlag_OffscreenSurface}, + }; + + TRACE("Initializing in mode %u, our window %p, clipping window %p.\n", + filter->mode, filter->baseControlWindow.baseWindow.hWnd, filter->hWndClippingWindow); + if (filter->num_surfaces) return S_OK; - if (This->mode == VMR9Mode_Windowless && !This->hWndClippingWindow) + if (filter->mode == VMR9Mode_Windowless && !filter->hWndClippingWindow) return (force ? VFW_E_RUNTIME_ERROR : S_OK); - TRACE("Initializing\n"); - info.dwFlags = VMR9AllocFlag_TextureSurface; - info.dwHeight = This->source_rect.bottom; - info.dwWidth = This->source_rect.right; + info.dwWidth = filter->source_rect.right; + info.dwHeight = filter->source_rect.bottom; info.Pool = D3DPOOL_DEFAULT; info.MinBuffers = 2; - FIXME("Reduce ratio to least common denominator\n"); info.szAspectRatio.cx = info.dwWidth; info.szAspectRatio.cy = info.dwHeight; - info.szNativeSize.cx = This->bmiheader.biWidth; - info.szNativeSize.cy = This->bmiheader.biHeight; - buffers = 2; + info.szNativeSize.cx = filter->bmiheader.biWidth; + info.szNativeSize.cy = filter->bmiheader.biHeight; - switch (This->bmiheader.biBitCount) + filter->cur_surface = 0; + if (filter->num_surfaces) { - case 8: info.Format = D3DFMT_R3G3B2; break; - case 15: info.Format = D3DFMT_X1R5G5B5; break; - case 16: info.Format = D3DFMT_R5G6B5; break; - case 24: info.Format = D3DFMT_R8G8B8; break; - case 32: info.Format = D3DFMT_X8R8G8B8; break; - default: - FIXME("Unknown bpp %u\n", This->bmiheader.biBitCount); - hr = E_INVALIDARG; + ERR("num_surfaces or d3d9_surfaces not 0\n"); + return E_FAIL; } - This->cur_surface = 0; - if (This->num_surfaces) + if (IsEqualGUID(&filter->renderer.filter.clsid, &CLSID_VideoMixingRenderer)) { - ERR("num_surfaces or d3d9_surfaces not 0\n"); - return E_FAIL; + switch (filter->bmiheader.biBitCount) + { + case 8: info.Format = D3DFMT_R3G3B2; break; + case 15: info.Format = D3DFMT_X1R5G5B5; break; + case 16: info.Format = D3DFMT_R5G6B5; break; + case 24: info.Format = D3DFMT_R8G8B8; break; + case 32: info.Format = D3DFMT_X8R8G8B8; break; + default: + FIXME("Unhandled bit depth %u.\n", filter->bmiheader.biBitCount); + return E_INVALIDARG; + } + + info.dwFlags = VMR9AllocFlag_TextureSurface; + return initialize_device(filter, &info); } - hr = IVMRSurfaceAllocatorEx9_InitializeDevice(This->allocator, This->cookie, &info, &buffers); - if (SUCCEEDED(hr)) + for (i = 0; i < ARRAY_SIZE(formats); ++i) { - SetRect(&This->source_rect, 0, 0, This->bmiheader.biWidth, This->bmiheader.biHeight); + if (IsEqualGUID(&mt->subtype, formats[i].subtype)) + { + info.Format = formats[i].format; + + if (formats[i].flags & VMR9AllocFlag_TextureSurface) + { + info.dwFlags = VMR9AllocFlag_TextureSurface; + if (SUCCEEDED(hr = initialize_device(filter, &info))) + return hr; + } - This->num_surfaces = buffers; + if (formats[i].flags & VMR9AllocFlag_OffscreenSurface) + { + info.dwFlags = VMR9AllocFlag_OffscreenSurface; + if (SUCCEEDED(hr = initialize_device(filter, &info))) + return hr; + } + } } + return hr; } @@ -411,7 +470,7 @@ static void vmr_start_stream(struct strmbase_renderer *iface) TRACE("(%p)\n", This); if (This->renderer.sink.pin.peer) - VMR9_maybe_init(This, TRUE); + VMR9_maybe_init(This, TRUE, &This->renderer.sink.pin.mt); IVMRImagePresenter9_StartPresenting(This->presenter, This->cookie); SetWindowPos(This->baseControlWindow.baseWindow.hWnd, NULL, This->source_rect.left, @@ -470,7 +529,7 @@ static HRESULT vmr_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE if (filter->mode || SUCCEEDED(hr = IVMRFilterConfig9_SetRenderingMode(&filter->IVMRFilterConfig9_iface, VMR9Mode_Windowed))) - hr = VMR9_maybe_init(filter, FALSE); + hr = VMR9_maybe_init(filter, FALSE, mt); return hr; } @@ -1772,7 +1831,7 @@ static HRESULT WINAPI VMR9WindowlessControl_SetVideoClippingWindow(IVMRWindowles EnterCriticalSection(&This->renderer.filter.csFilter); This->hWndClippingWindow = hwnd; if (This->renderer.sink.pin.peer) - VMR9_maybe_init(This, FALSE); + VMR9_maybe_init(This, FALSE, &This->renderer.sink.pin.mt); if (!hwnd) IVMRSurfaceAllocatorEx9_TerminateDevice(This->allocator, This->cookie); LeaveCriticalSection(&This->renderer.filter.csFilter);
1
0
0
0
Zebediah Figura : quartz/vmr9: Zero-initialize the VMR9PresentationInfo struct.
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: 429d09ba12eac20154ec135a2e788d965637d5a4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=429d09ba12eac20154ec135a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 19 18:50:50 2020 -0500 quartz/vmr9: Zero-initialize the VMR9PresentationInfo struct. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/vmr9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index e7a588e28a..d111057230 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -262,10 +262,10 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi { struct quartz_vmr *This = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface); const HANDLE events[2] = {This->run_event, This->renderer.flush_event}; + VMR9PresentationInfo info = {}; LPBYTE pbSrcStream = NULL; long cbSrcStream = 0; REFERENCE_TIME tStart, tStop; - VMR9PresentationInfo info; HRESULT hr; TRACE("%p %p\n", iface, pSample);
1
0
0
0
Alistair Leslie-Hughes : dmime: IDirectMusicPerformance8 GetGraph return DMUS_E_NOT_FOUND if graph not set.
by Alexandre Julliard
20 Mar '20
20 Mar '20
Module: wine Branch: master Commit: b075088ec58abc4cb7526c0e75abca62744c7bc0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b075088ec58abc4cb7526c0e…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Mar 17 05:25:25 2020 +0000 dmime: IDirectMusicPerformance8 GetGraph return DMUS_E_NOT_FOUND if graph not set. Just ensure the pointer and return value are correct from GetGraph. I plan to extend these tests at a later date. The tests also show that IDirectMusicPerformance8 has a internal IDirectMusicGraph implementation, returned via QueryInterface. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmime/performance.c | 23 +++++++++++++---------- dlls/dmime/tests/performance.c | 28 +++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index f535fe888f..8b38e12eb2 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -549,18 +549,21 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_FreePMsg(IDirectMusicPerforma } static HRESULT WINAPI IDirectMusicPerformance8Impl_GetGraph(IDirectMusicPerformance8 *iface, - IDirectMusicGraph **ppGraph) + IDirectMusicGraph **graph) { - IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); + IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface); - FIXME("(%p, %p): to check\n", This, ppGraph); - if (NULL != This->pToolGraph) { - *ppGraph = This->pToolGraph; - IDirectMusicGraph_AddRef(*ppGraph); - } else { - return E_FAIL; - } - return S_OK; + TRACE("(%p, %p)\n", This, graph); + + if (!graph) + return E_POINTER; + + *graph = This->pToolGraph; + if (This->pToolGraph) { + IDirectMusicGraph_AddRef(*graph); + } + + return *graph ? S_OK : DMUS_E_NOT_FOUND; } static HRESULT WINAPI IDirectMusicPerformance8Impl_SetGraph(IDirectMusicPerformance8 *iface, diff --git a/dlls/dmime/tests/performance.c b/dlls/dmime/tests/performance.c index 825faabc9c..cec89ca80a 100644 --- a/dlls/dmime/tests/performance.c +++ b/dlls/dmime/tests/performance.c @@ -345,7 +345,7 @@ static void test_pchannel(void) unsigned int i; HRESULT hr; - create_performance(&perf, NULL, NULL, FALSE); + create_performance(&perf, NULL, NULL, TRUE); hr = IDirectMusicPerformance8_Init(perf, NULL, NULL, NULL); ok(hr == S_OK, "Init failed: %08x\n", hr); hr = IDirectMusicPerformance8_PChannelInfo(perf, 0, &port, NULL, NULL); @@ -610,6 +610,31 @@ static void test_notification_type(void) IDirectMusicPerformance8_Release(perf); } +static void test_performance_graph(void) +{ + HRESULT hr; + IDirectMusicPerformance8 *perf; + IDirectMusicGraph *graph = NULL, *graph2; + + create_performance(&perf, NULL, NULL, FALSE); + hr = IDirectMusicPerformance8_Init(perf, NULL, NULL, NULL); + ok(hr == S_OK, "Init failed: %08x\n", hr); + + hr = IDirectMusicPerformance8_GetGraph(perf, NULL); + ok(hr == E_POINTER, "Failed: %08x\n", hr); + + hr = IDirectMusicPerformance8_GetGraph(perf, &graph2); + ok(hr == DMUS_E_NOT_FOUND, "Failed: %08x\n", hr); + ok(graph2 == NULL, "unexpected pointer.\n"); + + hr = IDirectMusicPerformance8_QueryInterface(perf, &IID_IDirectMusicGraph, (void**)&graph); + todo_wine ok(hr == S_OK, "Failed: %08x\n", hr); + + if (graph) + IDirectMusicGraph_Release(graph); + destroy_performance(perf, NULL, NULL); +} + START_TEST( performance ) { HRESULT hr; @@ -630,6 +655,7 @@ START_TEST( performance ) test_createport(); test_pchannel(); test_notification_type(); + test_performance_graph(); CoUninitialize(); }
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
100
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200