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
December 2023
----- 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
418 discussions
Start a n
N
ew thread
Alex Henrie : mscoree: Annotate WtoA with __WINE_(DEALLOC|MALLOC).
by Alexandre Julliard
05 Dec '23
05 Dec '23
Module: wine Branch: master Commit: 3adad15f406aa5a860b922d5e87ce3df8eba397c URL:
https://gitlab.winehq.org/wine/wine/-/commit/3adad15f406aa5a860b922d5e87ce3…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Dec 4 21:56:38 2023 -0700 mscoree: Annotate WtoA with __WINE_(DEALLOC|MALLOC). --- dlls/mscoree/mscoree_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h index ffcb852f35d..06db53136e1 100644 --- a/dlls/mscoree/mscoree_private.h +++ b/dlls/mscoree/mscoree_private.h @@ -20,7 +20,7 @@ #ifndef __MSCOREE_PRIVATE__ #define __MSCOREE_PRIVATE__ -extern char *WtoA(LPCWSTR wstr); +extern char *WtoA(const WCHAR *wstr) __WINE_DEALLOC(free) __WINE_MALLOC; extern HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj); extern HRESULT CLRMetaHostPolicy_CreateInstance(REFIID riid, void **ppobj);
1
0
0
0
Alex Henrie : mscoree: Use CRT allocation functions.
by Alexandre Julliard
05 Dec '23
05 Dec '23
Module: wine Branch: master Commit: b49831773df33792f64f2522fb0ca9f2ae5dc04c URL:
https://gitlab.winehq.org/wine/wine/-/commit/b49831773df33792f64f2522fb0ca9…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Dec 4 21:56:38 2023 -0700 mscoree: Use CRT allocation functions. --- dlls/mscoree/config.c | 27 ++++++++++------------- dlls/mscoree/cordebug.c | 16 +++++++------- dlls/mscoree/corruntimehost.c | 51 +++++++++++++++++++++---------------------- dlls/mscoree/metadata.c | 4 ++-- dlls/mscoree/metahost.c | 45 +++++++++++++++++++------------------- dlls/mscoree/mscoree_main.c | 16 +++++++------- 6 files changed, 77 insertions(+), 82 deletions(-)
1
0
0
0
Alexandre Julliard : winedump: Also dump ARM64 exception information for ARM64EC binaries.
by Alexandre Julliard
05 Dec '23
05 Dec '23
Module: wine Branch: master Commit: ef07f6bb72bd6b0805a1706f431e22fe18f33c1b URL:
https://gitlab.winehq.org/wine/wine/-/commit/ef07f6bb72bd6b0805a1706f431e22…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 5 14:37:30 2023 +0100 winedump: Also dump ARM64 exception information for ARM64EC binaries. --- tools/winedump/pe.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index 65ff347efe2..6e9407f6070 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -1726,14 +1726,13 @@ static void dump_arm64_unwind_info( const struct runtime_function_arm64 *func ) static void dump_dir_exceptions(void) { + static const void *arm64_funcs; unsigned int i, size; const void *funcs; - const IMAGE_FILE_HEADER *file_header; + const IMAGE_FILE_HEADER *file_header = &PE_nt_headers->FileHeader; + const IMAGE_ARM64EC_METADATA *metadata; funcs = get_dir_and_size(IMAGE_FILE_EXCEPTION_DIRECTORY, &size); - if (!funcs) return; - - file_header = &PE_nt_headers->FileHeader; switch (file_header->Machine) { @@ -1741,17 +1740,23 @@ static void dump_dir_exceptions(void) size /= sizeof(struct runtime_function_x86_64); printf( "%s exception info (%u functions):\n", get_machine_str( file_header->Machine ), size ); for (i = 0; i < size; i++) dump_x86_64_unwind_info( (struct runtime_function_x86_64*)funcs + i ); + if (!(metadata = get_hybrid_metadata())) break; + if (!(size = metadata->ExtraRFETableSize)) break; + if (!(funcs = RVA( metadata->ExtraRFETable, size ))) break; + if (funcs == arm64_funcs) break; /* already dumped */ + printf( "\n" ); + /* fall through */ + case IMAGE_FILE_MACHINE_ARM64: + arm64_funcs = funcs; + size /= sizeof(struct runtime_function_arm64); + printf( "%s exception info (%u functions):\n", get_machine_str( file_header->Machine ), size ); + for (i = 0; i < size; i++) dump_arm64_unwind_info( (struct runtime_function_arm64*)funcs + i ); break; case IMAGE_FILE_MACHINE_ARMNT: size /= sizeof(struct runtime_function_armnt); printf( "%s exception info (%u functions):\n", get_machine_str( file_header->Machine ), size ); for (i = 0; i < size; i++) dump_armnt_unwind_info( (struct runtime_function_armnt*)funcs + i ); break; - case IMAGE_FILE_MACHINE_ARM64: - size /= sizeof(struct runtime_function_arm64); - printf( "%s exception info (%u functions):\n", get_machine_str( file_header->Machine ), size ); - for (i = 0; i < size; i++) dump_arm64_unwind_info( (struct runtime_function_arm64*)funcs + i ); - break; default: printf( "Exception information not supported for %s binaries\n", get_machine_str(file_header->Machine));
1
0
0
0
Alexandre Julliard : ntdll: Use .seh handler in RtlUserThreadStart on ARM.
by Alexandre Julliard
05 Dec '23
05 Dec '23
Module: wine Branch: master Commit: a2e97854bf7e3bb0f26b3aae50aa870912bc3ffb URL:
https://gitlab.winehq.org/wine/wine/-/commit/a2e97854bf7e3bb0f26b3aae50aa87…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 4 17:32:55 2023 +0100 ntdll: Use .seh handler in RtlUserThreadStart on ARM. --- dlls/ntdll/signal_arm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index ae355aa5a8c..33233bb3a15 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -1582,6 +1582,18 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer, /*********************************************************************** * RtlUserThreadStart (NTDLL.@) */ +#ifdef __WINE_PE_BUILD +__ASM_GLOBAL_FUNC( RtlUserThreadStart, + ".seh_endprologue\n\t" + "mov r2, r1\n\t" + "mov r1, r0\n\t" + "mov r0, #0\n\t" + "ldr ip, 1f\n\t" + "ldr ip, [ip]\n\t" + "blx ip\n" + "1:\t.long " __ASM_NAME("pBaseThreadInitThunk") "\n\t" + ".seh_handler " __ASM_NAME("call_unhandled_exception_handler") ", %except" ) +#else void WINAPI RtlUserThreadStart( PRTL_THREAD_START_ROUTINE entry, void *arg ) { __TRY @@ -1594,6 +1606,7 @@ void WINAPI RtlUserThreadStart( PRTL_THREAD_START_ROUTINE entry, void *arg ) } __ENDTRY } +#endif /****************************************************************** * LdrInitializeThunk (NTDLL.@)
1
0
0
0
Alexandre Julliard : ntdll: Fix breakpoint exceptions on ARM.
by Alexandre Julliard
05 Dec '23
05 Dec '23
Module: wine Branch: master Commit: 8a1420653c4e6ad0e9f14a61bd3eb503a1ba1798 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8a1420653c4e6ad0e9f14a61bd3eb5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 5 09:39:11 2023 +0100 ntdll: Fix breakpoint exceptions on ARM. --- dlls/ntdll/unix/signal_arm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index e814b913830..5115fa7ec3a 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -998,7 +998,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context ) if (!self) { - NTSTATUS ret = get_thread_context( handle, &context, &self, IMAGE_FILE_MACHINE_ARMNT ); + NTSTATUS ret = get_thread_context( handle, context, &self, IMAGE_FILE_MACHINE_ARMNT ); if (ret || !self) return ret; } @@ -1077,6 +1077,9 @@ static void setup_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec ) return; } + /* fix up instruction pointer in context for EXCEPTION_BREAKPOINT */ + if (rec->ExceptionCode == EXCEPTION_BREAKPOINT) context.Pc -= 2; + stack = virtual_setup_exception( stack_ptr, sizeof(*stack), rec ); stack->rec = *rec; stack->context = context; @@ -1348,6 +1351,7 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) return; } case 0xfe: /* breakpoint */ + PC_sig(context) += 2; /* skip the instruction */ rec.ExceptionCode = EXCEPTION_BREAKPOINT; rec.NumberParameters = 1; break;
1
0
0
0
Alexandre Julliard : configure: Require SEH support for PE builds.
by Alexandre Julliard
05 Dec '23
05 Dec '23
Module: wine Branch: master Commit: 4a138da761160da3fb4d5e98ed5f6de0aa1e6270 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4a138da761160da3fb4d5e98ed5f6d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 4 12:57:48 2023 +0100 configure: Require SEH support for PE builds. --- configure | 49 ++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 13 ++++++++++++ dlls/ntdll/signal_x86_64.c | 6 +++--- include/wine/asm.h | 13 ++---------- 4 files changed, 67 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 718b0dd777c..9219276d336 100755 --- a/configure +++ b/configure @@ -10819,6 +10819,55 @@ printf "%s\n" "$res" >&6; } as_fn_append ${wine_arch}_CC " $res" ;; esac + if test "x$wine_arch" = xi386 +then : + +else $as_nop + as_wine_cv_seh_support=`printf "%s\n" "ac_cv_${wine_arch}_seh_support" | $as_tr_sh` + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports SEH directives" >&5 +printf %s "checking whether $CC supports SEH directives... " >&6; } +if eval test \${$as_wine_cv_seh_support+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +asm(".text\nac_test:\t.seh_proc ac_test\n\tnop\n\t.seh_stackalloc 16\n\t.seh_endprologue\n\t.seh_endproc"); +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_wine_cv_seh_support=yes" +else $as_nop + eval "$as_wine_cv_seh_support=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$as_wine_cv_seh_support + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval res=\$$as_wine_cv_seh_support + + if test "x$res" = xyes +then : + +else $as_nop + if test ${enable_archs+y} +then : + as_fn_error $? "The $wine_arch cross-compiler doesn't support SEH directives. +This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5 +fi + continue +fi +fi + as_fn_append PE_ARCHS " $wine_arch" { as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-fno-strict-aliasing" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5 diff --git a/configure.ac b/configure.ac index 47918e4bd18..26bcc3f6c21 100644 --- a/configure.ac +++ b/configure.ac @@ -954,6 +954,19 @@ This is an error since --enable-archs=$wine_arch was requested.])]) AS_VAR_APPEND([${wine_arch}_CC],[" $res"]) ;; esac + AS_VAR_IF([wine_arch],[i386],[], + [AS_VAR_PUSHDEF([wine_cv_seh_support],[ac_cv_${wine_arch}_seh_support]) + AC_CACHE_CHECK([whether $CC supports SEH directives], wine_cv_seh_support, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[asm(".text\nac_test:\t.seh_proc ac_test\n\tnop\n\t.seh_stackalloc 16\n\t.seh_endprologue\n\t.seh_endproc");]])], + [AS_VAR_SET([wine_cv_seh_support],[yes])],[AS_VAR_SET([wine_cv_seh_support],[no])])) + AS_VAR_COPY([res],[wine_cv_seh_support]) + AS_VAR_POPDEF([wine_cv_seh_support]) + AS_VAR_IF([res],[yes],[], + [AS_VAR_SET_IF([enable_archs], + [AC_MSG_ERROR([The $wine_arch cross-compiler doesn't support SEH directives. +This is an error since --enable-archs=$wine_arch was requested.])]) + continue])]) + AS_VAR_APPEND([PE_ARCHS],[" $wine_arch"]) WINE_TRY_PE_CFLAGS([-fno-strict-aliasing]) dnl clang needs to be told to fail on unknown options diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index ceb9d948f67..379d011bf88 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -369,7 +369,7 @@ DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR /*********************************************************************** * exception_handler_call_wrapper */ -#ifdef __ASM_SEH_SUPPORTED +#ifdef __WINE_PE_BUILD DWORD WINAPI exception_handler_call_wrapper( EXCEPTION_RECORD *rec, void *frame, CONTEXT *context, DISPATCHER_CONTEXT *dispatch ); @@ -1077,7 +1077,7 @@ DWORD __cdecl unwind_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR /*********************************************************************** * unwind_handler_call_wrapper */ -#ifdef __ASM_SEH_SUPPORTED +#ifdef __WINE_PE_BUILD DWORD WINAPI unwind_handler_call_wrapper( EXCEPTION_RECORD *rec, void *frame, CONTEXT *context, DISPATCHER_CONTEXT *dispatch ); @@ -1666,7 +1666,7 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer, /*********************************************************************** * RtlUserThreadStart (NTDLL.@) */ -#ifdef __ASM_SEH_SUPPORTED +#ifdef __WINE_PE_BUILD __ASM_GLOBAL_FUNC( RtlUserThreadStart, "subq $0x28,%rsp\n\t" ".seh_stackalloc 0x28\n\t" diff --git a/include/wine/asm.h b/include/wine/asm.h index 41c469a5436..0fa2dfcd1b7 100644 --- a/include/wine/asm.h +++ b/include/wine/asm.h @@ -45,17 +45,8 @@ # define __ASM_EHABI(str) #endif -#if defined(__SEH__) || (defined(_MSC_VER) && defined(__clang__) && (defined(__x86_64__) || defined(__aarch64__))) -# if defined(__aarch64__) && defined(__clang_major__) && (__clang_major__ < 12 || defined(__apple_build_version__)) - /* Clang got support for aarch64 SEH assembly directives in Clang 12, - * before that, only .seh_startproc/.seh_endproc but nothing else was - * supported. Support for it doesn't exist in any Apple branded version - * of Clang yet. */ -# define __ASM_SEH(str) -# else -# define __ASM_SEH(str) str -# define __ASM_SEH_SUPPORTED -# endif +#if defined(__WINE_PE_BUILD) && !defined(__i386__) +# define __ASM_SEH(str) str #else # define __ASM_SEH(str) #endif
1
0
0
0
Vijay Kiran Kamuju : dsdmo: Add Gargle effect stub.
by Alexandre Julliard
04 Dec '23
04 Dec '23
Module: wine Branch: master Commit: d37f0892bee3399a7e2c857281b7240ae3d60857 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d37f0892bee3399a7e2c857281b724…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Sat Dec 2 16:38:42 2023 +0100 dsdmo: Add Gargle effect stub. --- dlls/dsdmo/dsdmo.idl | 8 ++++ dlls/dsdmo/main.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/dsdmo/tests/dsdmo.c | 12 +++--- 3 files changed, 109 insertions(+), 6 deletions(-) diff --git a/dlls/dsdmo/dsdmo.idl b/dlls/dsdmo/dsdmo.idl index df76ac15e96..d1a0765fcf4 100644 --- a/dlls/dsdmo/dsdmo.idl +++ b/dlls/dsdmo/dsdmo.idl @@ -81,3 +81,11 @@ coclass DirectSoundFlangerDMO {} vi_progid("Microsoft.DirectSoundDistortionDMO") ] coclass DirectSoundDistortionDMO {} + +[ + uuid(dafd8210-5711-4b91-9fe3-f75b7ae279bf), + threading(both), + progid("Microsoft.DirectSoundGargleDMO.1"), + vi_progid("Microsoft.DirectSoundGargleDMO") +] +coclass DirectSoundGargleDMO {} diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 5c667816d81..77345b1b5d1 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -1433,6 +1433,100 @@ static HRESULT distortion_create(IUnknown *outer, IUnknown **out) return S_OK; } +struct gargle +{ + struct effect effect; + IDirectSoundFXGargle IDirectSoundFXGargle_iface; +}; + +static inline struct gargle *impl_from_IDirectSoundFXGargle(IDirectSoundFXGargle *iface) +{ + return CONTAINING_RECORD(iface, struct gargle, IDirectSoundFXGargle_iface); +} + +static HRESULT WINAPI gargle_QueryInterface(IDirectSoundFXGargle *iface, REFIID iid, void **out) +{ + struct gargle *effect = impl_from_IDirectSoundFXGargle(iface); + return IUnknown_QueryInterface(effect->effect.outer_unk, iid, out); +} + +static ULONG WINAPI gargle_AddRef(IDirectSoundFXGargle *iface) +{ + struct gargle *effect = impl_from_IDirectSoundFXGargle(iface); + return IUnknown_AddRef(effect->effect.outer_unk); +} + +static ULONG WINAPI gargle_Release(IDirectSoundFXGargle *iface) +{ + struct gargle *effect = impl_from_IDirectSoundFXGargle(iface); + return IUnknown_Release(effect->effect.outer_unk); +} + +static HRESULT WINAPI gargle_SetAllParameters(IDirectSoundFXGargle *iface, const DSFXGargle *params) +{ + struct gargle *This = impl_from_IDirectSoundFXGargle(iface); + FIXME("(%p) %p\n", This, params); + return E_NOTIMPL; +} + +static HRESULT WINAPI gargle_GetAllParameters(IDirectSoundFXGargle *iface, DSFXGargle *params) +{ + struct gargle *This = impl_from_IDirectSoundFXGargle(iface); + FIXME("(%p) %p\n", This, params); + return E_NOTIMPL; +} + +static const struct IDirectSoundFXGargleVtbl gargle_vtbl = +{ + gargle_QueryInterface, + gargle_AddRef, + gargle_Release, + gargle_SetAllParameters, + gargle_GetAllParameters +}; + +static struct gargle *impl_gargle_from_effect(struct effect *iface) +{ + return CONTAINING_RECORD(iface, struct gargle, effect); +} + +static void *gargle_query_interface(struct effect *iface, REFIID iid) +{ + struct gargle *effect = impl_gargle_from_effect(iface); + + if (IsEqualGUID(iid, &IID_IDirectSoundFXGargle)) + return &effect->IDirectSoundFXGargle_iface; + return NULL; +} + +static void gargle_destroy(struct effect *iface) +{ + struct gargle *effect = impl_gargle_from_effect(iface); + + free(effect); +} + +static const struct effect_ops gargle_ops = +{ + .destroy = gargle_destroy, + .query_interface = gargle_query_interface, +}; + +static HRESULT gargle_create(IUnknown *outer, IUnknown **out) +{ + struct gargle *object; + + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; + + effect_init(&object->effect, outer, &gargle_ops); + object->IDirectSoundFXGargle_iface.lpVtbl = &gargle_vtbl; + + TRACE("Created gargle effect %p.\n", object); + *out = &object->effect.IUnknown_inner; + return S_OK; +} + struct class_factory { IClassFactory IClassFactory_iface; @@ -1522,6 +1616,7 @@ class_factories[] = {&GUID_DSFX_STANDARD_CHORUS, {{&class_factory_vtbl}, chorus_create}}, {&GUID_DSFX_STANDARD_FLANGER, {{&class_factory_vtbl}, flanger_create}}, {&GUID_DSFX_STANDARD_DISTORTION, {{&class_factory_vtbl}, distortion_create}}, + {&GUID_DSFX_STANDARD_GARGLE, {{&class_factory_vtbl}, gargle_create}}, }; HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index a3eb5a7d864..6b486f62d23 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -446,12 +446,14 @@ static void test_gargle_parameters(void) hr = CoCreateInstance(&GUID_DSFX_STANDARD_GARGLE, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXGargle, (void **)&gargle); - todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return; hr = IDirectSoundFXGargle_GetAllParameters(gargle, ¶ms); - ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + if (hr != S_OK) + return; ok(params.dwRateHz == 20, "Got rate %lu Hz.\n", params.dwRateHz); ok(params.dwWaveShape == DSFXGARGLE_WAVE_TRIANGLE, "Got wave shape %lu.\n", params.dwWaveShape); @@ -548,7 +550,6 @@ START_TEST(dsdmo) { const GUID *clsid; const GUID *iid; - BOOL todo; } tests[] = { @@ -557,7 +558,7 @@ START_TEST(dsdmo) {&GUID_DSFX_STANDARD_DISTORTION, &IID_IDirectSoundFXDistortion}, {&GUID_DSFX_STANDARD_ECHO, &IID_IDirectSoundFXEcho}, {&GUID_DSFX_STANDARD_FLANGER, &IID_IDirectSoundFXFlanger}, - {&GUID_DSFX_STANDARD_GARGLE, &IID_IDirectSoundFXGargle, TRUE}, + {&GUID_DSFX_STANDARD_GARGLE, &IID_IDirectSoundFXGargle}, {&GUID_DSFX_STANDARD_I3DL2REVERB, &IID_IDirectSoundFXI3DL2Reverb}, {&GUID_DSFX_STANDARD_PARAMEQ, &IID_IDirectSoundFXParamEq}, {&GUID_DSFX_WAVES_REVERB, &IID_IDirectSoundFXWavesReverb}, @@ -572,8 +573,7 @@ START_TEST(dsdmo) HRESULT hr; hr = CoCreateInstance(tests[i].clsid, NULL, CLSCTX_INPROC_SERVER, tests[i].iid, (void **)&unk); - todo_wine_if(tests[i].todo) ok(hr == S_OK, "Failed to create %s, hr %#lx.\n", - debugstr_guid(tests[i].clsid), hr); + ok(hr == S_OK, "For clsid %s, got hr %#lx.\n", debugstr_guid(tests[i].clsid), hr); if (hr == S_OK) IUnknown_Release(unk); else
1
0
0
0
Vijay Kiran Kamuju : dsdmo: Add Distortion effect stub.
by Alexandre Julliard
04 Dec '23
04 Dec '23
Module: wine Branch: master Commit: cf6046afb6ec9047e30fc9d533e96faa66294448 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cf6046afb6ec9047e30fc9d533e96f…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Sat Dec 2 16:35:59 2023 +0100 dsdmo: Add Distortion effect stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55978
--- dlls/dsdmo/dsdmo.idl | 8 ++++ dlls/dsdmo/main.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/dsdmo/tests/dsdmo.c | 8 ++-- 3 files changed, 108 insertions(+), 3 deletions(-) diff --git a/dlls/dsdmo/dsdmo.idl b/dlls/dsdmo/dsdmo.idl index 30c54d0f889..df76ac15e96 100644 --- a/dlls/dsdmo/dsdmo.idl +++ b/dlls/dsdmo/dsdmo.idl @@ -73,3 +73,11 @@ coclass DirectSoundChorusDMO {} vi_progid("Microsoft.DirectSoundFlangerDMO") ] coclass DirectSoundFlangerDMO {} + +[ + uuid(ef114c90-cd1d-484e-96e5-09cfaf912a21), + threading(both), + progid("Microsoft.DirectSoundDistortionDMO.1"), + vi_progid("Microsoft.DirectSoundDistortionDMO") +] +coclass DirectSoundDistortionDMO {} diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 769f040c790..5c667816d81 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -1339,6 +1339,100 @@ static HRESULT flanger_create(IUnknown *outer, IUnknown **out) return S_OK; } +struct distortion +{ + struct effect effect; + IDirectSoundFXDistortion IDirectSoundFXDistortion_iface; +}; + +static inline struct distortion *impl_from_IDirectSoundFXDistortion(IDirectSoundFXDistortion *iface) +{ + return CONTAINING_RECORD(iface, struct distortion, IDirectSoundFXDistortion_iface); +} + +static HRESULT WINAPI distortion_QueryInterface(IDirectSoundFXDistortion *iface, REFIID iid, void **out) +{ + struct distortion *effect = impl_from_IDirectSoundFXDistortion(iface); + return IUnknown_QueryInterface(effect->effect.outer_unk, iid, out); +} + +static ULONG WINAPI distortion_AddRef(IDirectSoundFXDistortion *iface) +{ + struct distortion *effect = impl_from_IDirectSoundFXDistortion(iface); + return IUnknown_AddRef(effect->effect.outer_unk); +} + +static ULONG WINAPI distortion_Release(IDirectSoundFXDistortion *iface) +{ + struct distortion *effect = impl_from_IDirectSoundFXDistortion(iface); + return IUnknown_Release(effect->effect.outer_unk); +} + +static HRESULT WINAPI distortion_SetAllParameters(IDirectSoundFXDistortion *iface, const DSFXDistortion *params) +{ + struct distortion *This = impl_from_IDirectSoundFXDistortion(iface); + FIXME("(%p) %p\n", This, params); + return E_NOTIMPL; +} + +static HRESULT WINAPI distortion_GetAllParameters(IDirectSoundFXDistortion *iface, DSFXDistortion *params) +{ + struct distortion *This = impl_from_IDirectSoundFXDistortion(iface); + FIXME("(%p) %p\n", This, params); + return E_NOTIMPL; +} + +static const struct IDirectSoundFXDistortionVtbl distortion_vtbl = +{ + distortion_QueryInterface, + distortion_AddRef, + distortion_Release, + distortion_SetAllParameters, + distortion_GetAllParameters +}; + +static struct distortion *impl_distortion_from_effect(struct effect *iface) +{ + return CONTAINING_RECORD(iface, struct distortion, effect); +} + +static void *distortion_query_interface(struct effect *iface, REFIID iid) +{ + struct distortion *effect = impl_distortion_from_effect(iface); + + if (IsEqualGUID(iid, &IID_IDirectSoundFXDistortion)) + return &effect->IDirectSoundFXDistortion_iface; + return NULL; +} + +static void distortion_destroy(struct effect *iface) +{ + struct distortion *effect = impl_distortion_from_effect(iface); + + free(effect); +} + +static const struct effect_ops distortion_ops = +{ + .destroy = distortion_destroy, + .query_interface = distortion_query_interface, +}; + +static HRESULT distortion_create(IUnknown *outer, IUnknown **out) +{ + struct distortion *object; + + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; + + effect_init(&object->effect, outer, &distortion_ops); + object->IDirectSoundFXDistortion_iface.lpVtbl = &distortion_vtbl; + + TRACE("Created distortion effect %p.\n", object); + *out = &object->effect.IUnknown_inner; + return S_OK; +} + struct class_factory { IClassFactory IClassFactory_iface; @@ -1427,6 +1521,7 @@ class_factories[] = {&GUID_DSFX_STANDARD_COMPRESSOR, {{&class_factory_vtbl}, compressor_create}}, {&GUID_DSFX_STANDARD_CHORUS, {{&class_factory_vtbl}, chorus_create}}, {&GUID_DSFX_STANDARD_FLANGER, {{&class_factory_vtbl}, flanger_create}}, + {&GUID_DSFX_STANDARD_DISTORTION, {{&class_factory_vtbl}, distortion_create}}, }; HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index 369e02aeaa4..a3eb5a7d864 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -363,12 +363,14 @@ static void test_distortion_parameters(void) hr = CoCreateInstance(&GUID_DSFX_STANDARD_DISTORTION, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXDistortion, (void **)&distortion); - todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return; hr = IDirectSoundFXDistortion_GetAllParameters(distortion, ¶ms); - ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + if (hr != S_OK) + return; ok(params.fGain == -18.0f, "Got gain %.8e dB.\n", params.fGain); ok(params.fEdge == 15.0f, "Got edge %.8e%%.\n", params.fEdge); ok(params.fPostEQCenterFrequency == 2400.0f, "Got center frequency %.8e Hz.\n", params.fPostEQCenterFrequency); @@ -552,7 +554,7 @@ START_TEST(dsdmo) { {&GUID_DSFX_STANDARD_CHORUS, &IID_IDirectSoundFXChorus}, {&GUID_DSFX_STANDARD_COMPRESSOR, &IID_IDirectSoundFXCompressor}, - {&GUID_DSFX_STANDARD_DISTORTION, &IID_IDirectSoundFXDistortion, TRUE}, + {&GUID_DSFX_STANDARD_DISTORTION, &IID_IDirectSoundFXDistortion}, {&GUID_DSFX_STANDARD_ECHO, &IID_IDirectSoundFXEcho}, {&GUID_DSFX_STANDARD_FLANGER, &IID_IDirectSoundFXFlanger}, {&GUID_DSFX_STANDARD_GARGLE, &IID_IDirectSoundFXGargle, TRUE},
1
0
0
0
Jon Doron : win32u: Add registry data for GPU memory size.
by Alexandre Julliard
04 Dec '23
04 Dec '23
Module: wine Branch: master Commit: 28ca56257e15354a1ba612aa7f2a33329d038f89 URL:
https://gitlab.winehq.org/wine/wine/-/commit/28ca56257e15354a1ba612aa7f2a33…
Author: Jon Doron <arilou(a)gmail.com> Date: Wed Nov 22 07:20:38 2023 +0200 win32u: Add registry data for GPU memory size. Starcraft Remastered is looking up for the GPU physical memory size to check for minimum requirements to enable RealTime Lighting. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46624
Signed-off-by: Jon Doron <arilou(a)gmail.com> --- dlls/win32u/sysparams.c | 15 +++++++++++++++ dlls/winex11.drv/xrandr.c | 13 ++++++++++++- include/wine/gdi_driver.h | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index d0fb0f6415a..ad6e7dce39b 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1206,6 +1206,8 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) unsigned int gpu_index, size; HKEY hkey, subkey; LARGE_INTEGER ft; + ULONG memory_size; + ULONGLONG qw_memory_size; static const BOOL present = TRUE; static const WCHAR wine_adapterW[] = {'W','i','n','e',' ','A','d','a','p','t','e','r',0}; @@ -1221,6 +1223,12 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) static const WCHAR chip_typeW[] = {'H','a','r','d','w','a','r','e','I','n','f','o','r','m','a','t','i','o','n','.', 'C','h','i','p','T','y','p','e',0}; + static const WCHAR qw_memory_sizeW[] = + {'H','a','r','d','w','a','r','e','I','n','f','o','r','m','a','t','i','o','n','.', + 'q','w','M','e','m','o','r','y','S','i','z','e',0}; + static const WCHAR memory_sizeW[] = + {'H','a','r','d','w','a','r','e','I','n','f','o','r','m','a','t','i','o','n','.', + 'M','e','m','o','r','y','S','i','z','e',0}; static const WCHAR dac_typeW[] = {'H','a','r','d','w','a','r','e','I','n','f','o','r','m','a','t','i','o','n','.', 'D','a','c','T','y','p','e',0}; @@ -1373,6 +1381,13 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) set_reg_value( hkey, chip_typeW, REG_BINARY, desc, size ); set_reg_value( hkey, dac_typeW, REG_BINARY, ramdacW, sizeof(ramdacW) ); + /* If we failed to retrieve the gpu memory size set a default of 1Gb */ + qw_memory_size = gpu->memory_size ? gpu->memory_size : 1073741824; + + set_reg_value( hkey, qw_memory_sizeW, REG_QWORD, &qw_memory_size, sizeof(qw_memory_size) ); + memory_size = (ULONG)min( gpu->memory_size, (ULONGLONG)ULONG_MAX ); + set_reg_value( hkey, memory_sizeW, REG_DWORD, &memory_size, sizeof(memory_size) ); + if (gpu->vendor_id && gpu->device_id) { /* The last seven digits are the driver number. */ diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index cf3f911cf5b..c5e47cb355c 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -643,9 +643,11 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid VkResult (*pvkGetRandROutputDisplayEXT)( VkPhysicalDevice, Display *, RROutput, VkDisplayKHR * ); PFN_vkGetPhysicalDeviceProperties2KHR pvkGetPhysicalDeviceProperties2KHR; PFN_vkEnumeratePhysicalDevices pvkEnumeratePhysicalDevices; - uint32_t device_count, device_idx, output_idx, i; + PFN_vkGetPhysicalDeviceMemoryProperties pvkGetPhysicalDeviceMemoryProperties; + uint32_t device_count, device_idx, output_idx, heap_idx, i; VkPhysicalDevice *vk_physical_devices = NULL; VkPhysicalDeviceProperties2 properties2; + VkPhysicalDeviceMemoryProperties mem_properties; VkInstanceCreateInfo create_info; VkPhysicalDeviceIDProperties id; VkInstance vk_instance = NULL; @@ -679,6 +681,7 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid LOAD_VK_FUNC(vkEnumeratePhysicalDevices) LOAD_VK_FUNC(vkGetPhysicalDeviceProperties2KHR) LOAD_VK_FUNC(vkGetRandROutputDisplayEXT) + LOAD_VK_FUNC(vkGetPhysicalDeviceMemoryProperties) #undef LOAD_VK_FUNC vr = pvkEnumeratePhysicalDevices( vk_instance, &device_count, NULL ); @@ -738,6 +741,14 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid } RtlUTF8ToUnicodeN( gpu->name, sizeof(gpu->name), &len, properties2.properties.deviceName, strlen( properties2.properties.deviceName ) + 1 ); + + pvkGetPhysicalDeviceMemoryProperties( vk_physical_devices[device_idx], &mem_properties ); + for (heap_idx = 0; heap_idx < mem_properties.memoryHeapCount; heap_idx++) + { + if (mem_properties.memoryHeaps[heap_idx].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) + gpu->memory_size += mem_properties.memoryHeaps[heap_idx].size; + } + ret = TRUE; goto done; } diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index aaa2f92cbfa..26562bfef2b 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -251,6 +251,7 @@ struct gdi_gpu UINT subsys_id; UINT revision_id; GUID vulkan_uuid; /* Vulkan device UUID */ + ULONGLONG memory_size; }; struct gdi_adapter
1
0
0
0
Haoyang Chen : rpcrt4/tests: Test explicit_handle.
by Alexandre Julliard
04 Dec '23
04 Dec '23
Module: wine Branch: master Commit: 6b6aff83221d38167488b48adf4f8e12e0039f07 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6b6aff83221d38167488b48adf4f8e…
Author: Haoyang Chen <chenhaoyang(a)kylinos.cn> Date: Tue Nov 21 09:34:14 2023 +0800 rpcrt4/tests: Test explicit_handle. --- dlls/rpcrt4/tests/Makefile.in | 1 + dlls/rpcrt4/tests/explicit_handle.idl | 32 +++++++++++++ dlls/rpcrt4/tests/server.c | 87 +++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) diff --git a/dlls/rpcrt4/tests/Makefile.in b/dlls/rpcrt4/tests/Makefile.in index f46ff49219a..0e888069783 100644 --- a/dlls/rpcrt4/tests/Makefile.in +++ b/dlls/rpcrt4/tests/Makefile.in @@ -9,6 +9,7 @@ server_interp_EXTRAIDLFLAGS = -Oicf --prefix-client=interp_ SOURCES = \ cstub.c \ cstub.idl \ + explicit_handle.idl \ generated.c \ ndr_marshall.c \ rpc.c \ diff --git a/dlls/rpcrt4/tests/explicit_handle.idl b/dlls/rpcrt4/tests/explicit_handle.idl new file mode 100644 index 00000000000..ab41f771fe7 --- /dev/null +++ b/dlls/rpcrt4/tests/explicit_handle.idl @@ -0,0 +1,32 @@ +/* + * Copyright 2023 Haoyang Chen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma makedep client +#pragma makedep server + +[ + uuid(00000000-4114-0704-2301-000000000002), + explicit_handle +] + +interface RPCExplicitHandle +{ + int add([in] handle_t hBinding, [in] int a, [in] int b); + int getNum([in] int a, [in] handle_t hBinding); + void Shutdown([in] handle_t hBinding); +} diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index 8e87a468f86..93934da8097 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -30,6 +30,7 @@ #define SKIP_TYPE_DECLS #include "server_interp.h" #include "server_defines.h" +#include "explicit_handle.h" #include <stddef.h> #include <stdio.h> @@ -1202,6 +1203,30 @@ void __cdecl s_test_I_RpcBindingInqLocalClientPID(unsigned int protseq, RPC_BIND winetest_pop_context(); } +int __cdecl s_add(handle_t binding, int a, int b) +{ + ok(binding != NULL, "explicit handle is NULL\n"); + return a + b; +} + +int __cdecl s_getNum(int a, handle_t binding) +{ + ok(binding != NULL, "explicit handle is NULL\n"); + return a + 2; +} + +void __cdecl s_Shutdown(handle_t binding) +{ + RPC_STATUS status; + ULONG pid = 0; + ok(binding != NULL, "explicit handle is NULL\n"); + + status = I_RpcBindingInqLocalClientPID(binding, &pid); + ok(status == RPC_S_OK, "Got unexpected %ld.\n", status); + ok(pid == client_info.dwProcessId, "Got unexpected pid: %ld client pid: %ld.\n", pid, client_info.dwProcessId); + ok(SetEvent(stop_event), "SetEvent\n"); +} + void __RPC_USER ctx_handle_t_rundown(ctx_handle_t ctx_handle) { ok(ctx_handle == (ctx_handle_t)0xdeadbeef, "Unexpected ctx_handle %p\n", ctx_handle); @@ -2034,6 +2059,7 @@ client(const char *test) static unsigned char port[] = PORT; static unsigned char pipe[] = PIPE; static unsigned char guid[] = "00000000-4114-0704-2301-000000000000"; + static unsigned char explicit_handle_guid[] = "00000000-4114-0704-2301-000000000002"; unsigned char *binding; @@ -2138,6 +2164,21 @@ client(const char *test) ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n"); ok(RPC_S_OK == RpcBindingFree(&IInterpServer_IfHandle), "RpcBindingFree\n"); } + else if (strcmp(test, "explicit_handle") == 0) + { + IMixedServer_IfHandle = NULL; + ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, explicit_handle_guid, NULL, &binding), "RpcStringBindingCompose\n"); + ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IMixedServer_IfHandle), "RpcBindingFromStringBinding\n"); + + test_is_server_listening(IMixedServer_IfHandle, RPC_S_OK); + + ok(add(IMixedServer_IfHandle, 2, 3) == 5, "RPC add\n"); + ok(getNum(7, IMixedServer_IfHandle) == 9, "RPC getNum\n"); + Shutdown(IMixedServer_IfHandle); + + ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n"); + ok(RPC_S_OK == RpcBindingFree(&IMixedServer_IfHandle), "RpcBindingFree\n"); + } } static void @@ -2149,6 +2190,7 @@ server(void) static unsigned char pipe[] = PIPE; static unsigned char ncalrpc[] = "ncalrpc"; static unsigned char guid[] = "00000000-4114-0704-2301-000000000000"; + static unsigned char explicit_handle_guid[] = "00000000-4114-0704-2301-000000000002"; RPC_STATUS status, iptcp_status, np_status, ncalrpc_status; DWORD ret; @@ -2247,6 +2289,51 @@ server(void) ok(status == RPC_S_OK, "RpcServerUnregisterIf() failed: %lu\n", status); } + /* explicit handle */ + stop_event = CreateEventW(NULL, FALSE, FALSE, NULL); + ok(stop_event != NULL, "CreateEvent failed with error %ld\n", GetLastError()); + + ncalrpc_status = RpcServerUseProtseqEpA(ncalrpc, 0, explicit_handle_guid, NULL); + if (ncalrpc_status == RPC_S_PROTSEQ_NOT_SUPPORTED) + skip("Protocol sequence ncacn_np is not supported\n"); + else + ok(ncalrpc_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", ncalrpc_status); + + if (pRpcServerRegisterIfEx) + { + trace("Using RpcServerRegisterIfEx\n"); + status = pRpcServerRegisterIfEx(s_RPCExplicitHandle_v0_0_s_ifspec, NULL, NULL, + RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH, + RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); + ok(status == RPC_S_OK, "RpcServerRegisterIfEx failed with status %ld\n", status); + test_is_server_listening(NULL, RPC_S_NOT_LISTENING); + status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, TRUE); + ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status); + } + else + { + status = RpcServerRegisterIf(s_RPCExplicitHandle_v0_0_s_ifspec, NULL, NULL); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status); + status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, TRUE); + ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status); + } + + test_is_server_listening(NULL, RPC_S_OK); + + run_client("explicit_handle"); + + ret = WaitForSingleObject(stop_event, 1000); + ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n"); + + if (pRpcServerRegisterIfEx) + { + status = RpcServerUnregisterIf(s_RPCExplicitHandle_v0_0_s_ifspec, NULL, TRUE); + ok(status == RPC_S_OK, "RpcServerUnregisterIf() failed: %lu\n", status); + } + + CloseHandle(stop_event); + stop_event = NULL; + CoUninitialize(); }
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
42
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
Results per page:
10
25
50
100
200