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
July 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
826 discussions
Start a n
N
ew thread
Alexandre Julliard : winebuild: Store the syscall frame in the thread data on ARM.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 28e443d9e2a3bfea936b4f6f97bf78f6ccf6a91a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=28e443d9e2a3bfea936b4f6f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 28 13:01:46 2020 +0200 winebuild: Store the syscall frame in the thread data on ARM. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/signal_arm.c | 31 +++++++++++++++++++++ tools/winebuild/import.c | 66 ++++++++++++++++++++++++++++++-------------- 2 files changed, 77 insertions(+), 20 deletions(-) diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index 30f2302045..19a952b03f 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -172,6 +172,37 @@ enum arm_trap_code TRAP_ARM_ALIGNFLT = 17, /* Alignment check exception */ }; +struct syscall_frame +{ + struct syscall_frame *prev_frame; + DWORD cpsr; + DWORD r5; + DWORD r6; + DWORD r7; + DWORD r8; + DWORD r9; + DWORD r10; + DWORD r11; + DWORD thunk_addr; + DWORD r4; + DWORD ret_addr; +}; + +struct arm_thread_data +{ + void *exit_frame; /* 1d4 exit frame pointer */ + struct syscall_frame *syscall_frame; /* 1d8 frame pointer on syscall entry */ +}; + +C_ASSERT( sizeof(struct arm_thread_data) <= sizeof(((struct ntdll_thread_data *)0)->cpu_data) ); +C_ASSERT( offsetof( TEB, GdiTebBatch ) + offsetof( struct arm_thread_data, exit_frame ) == 0x1d4 ); +C_ASSERT( offsetof( TEB, GdiTebBatch ) + offsetof( struct arm_thread_data, syscall_frame ) == 0x1d8 ); + +static inline struct arm_thread_data *arm_thread_data(void) +{ + return (struct arm_thread_data *)ntdll_get_thread_data()->cpu_data; +} + /*********************************************************************** * unwind_builtin_dll diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 09cb320b5d..3819225c7c 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1561,20 +1561,45 @@ void output_syscalls( DLLSPEC *spec ) output( "\tjmp 3b\n" ); break; case CPU_ARM: - output( "\tldr r1, 4f\n" ); - output( "\tcmp r0, r1\n" ); - output( "\tbcs 2f\n" ); - output( "\tldr r1, 3f\n"); - output( "\tadd r1, pc\n"); - output( "\tldr ip, [r1, r0, lsl #2]\n"); - output( "1:\tpop {r0-r1}\n" ); - output( "\tbx ip\n"); - output( "2:\tpop {r0-r1}\n" ); - output( "\tldr r0,5f\n" ); - output( "bx lr\n" ); - output( "3:\t.long .Lsyscall_table-1b\n" ); - output( "4:\t.long %u\n", count ); - output( "5:\t.long 0x%x\n", invalid_param ); + output( "\tpush {r5-r11,lr}\n" ); + output( "\tadd r6, sp, #40\n" ); /* stack parameters */ + output( "\tldr r5, 8f\n" ); + output( "\tcmp r4, r5\n" ); + output( "\tbcs 5f\n" ); + output( "\tsub sp, sp, #8\n" ); + output( "\tpush {r0-r3}\n" ); + output( "\tbl %s\n", asm_name("NtCurrentTeb") ); + output( "\tadd r7, r0, #0x1d8\n" ); /* arm_thread_data()->syscall_frame */ + output( "\tpop {r0-r3}\n" ); + output( "\tldr r8, [r7]\n" ); + output( "\tstr r8, [sp]\n" ); /* prev frame */ + output( "\tstr sp, [r7]\n" ); /* syscall frame */ + output( "\tmrs ip, CPSR\n" ); + output( "\tstr ip, [sp, #4]\n" ); + output( "\tldr r5, 7f\n"); + output( "\tadd r5, pc\n"); + output( "\tldrb r5, [r5, r4]\n" ); /* syscall args */ + output( "1:\tsubs r5, #16\n" ); /* first 4 args are in registers */ + output( "\tble 3f\n" ); + output( "\tsub sp, r5\n" ); + output( "\tand sp, #~7\n" ); + output( "2:\tsubs r5, r5, #4\n" ); + output( "\tldr ip, [r6, r5]\n" ); + output( "\tstr ip, [sp, r5]\n" ); + output( "\tbgt 2b\n" ); + output( "3:\tldr r5, 6f\n"); + output( "\tadd r5, pc\n"); + output( "\tldr ip, [r5, r4, lsl #2]\n"); /* syscall table */ + output( "4:\tblx ip\n"); + output( "\tstr r8, [r7]\n" ); /* prev frame */ + output( "\tsub sp, r6, #40\n" ); + output( "\tpop {r5-r11,pc}\n" ); + output( "5:\tldr r0,9f\n" ); + output( "\tpop {r5-r11,pc}\n" ); + output( "6:\t.long .Lsyscall_table-4b\n" ); + output( "7:\t.long .Lsyscall_args-1b\n" ); + output( "8:\t.long %u\n", count ); + output( "9:\t.long 0x%x\n", invalid_param ); break; case CPU_ARM64: output( "\tcmp x8, %u\n", count ); @@ -1658,12 +1683,13 @@ void output_syscalls( DLLSPEC *spec ) output( "\tret\n" ); break; case CPU_ARM: - output( "\tpush {r0-r1}\n" ); - output( "\tldr r0, 3f\n"); - output( "\tldr r1, 2f\n"); - output( "\tadd r1, pc\n"); - output( "\tldr ip, [r1]\n"); - output( "1:\tbx ip\n"); + output( "\tpush {r4,lr}\n" ); + output( "\tldr r4, 3f\n"); + output( "\tldr ip, 2f\n"); + output( "\tadd ip, pc\n"); + output( "\tldr ip, [ip]\n"); + output( "1:\tblx ip\n"); + output( "\tpop {r4,pc}\n" ); output( "2:\t.long %s-1b\n", asm_name("__wine_syscall_dispatcher") ); output( "3:\t.long %u\n", i ); break;
1
0
0
0
Alexandre Julliard : winebuild: Store the syscall frame in the thread data on x86_64.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 9a7c56d9e7f8e49dc98dace53b10d0753f0e27a7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9a7c56d9e7f8e49dc98dace5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 28 13:01:24 2020 +0200 winebuild: Store the syscall frame in the thread data on x86_64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/signal_x86_64.c | 34 +++++++++++++++++++++++++++------- tools/winebuild/import.c | 41 +++++++++++++++++++++++++++++++++-------- 2 files changed, 60 insertions(+), 15 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 630f8e22f3..b954ef9458 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -240,19 +240,39 @@ struct stack_layout C_ASSERT( sizeof(struct stack_layout) == 0x630 ); /* Should match the size in call_user_exception_dispatcher(). */ +struct syscall_frame +{ + struct syscall_frame *prev_frame; + ULONG64 pad; + ULONG64 xmm[10 * 2]; /* xmm6-xmm15 */ + ULONG64 mxcsr; + ULONG64 r12; + ULONG64 r13; + ULONG64 r14; + ULONG64 r15; + ULONG64 rdi; + ULONG64 rsi; + ULONG64 rbx; + ULONG64 rbp; + ULONG64 thunk_addr; + ULONG64 ret_addr; +}; + struct amd64_thread_data { - DWORD_PTR dr0; /* 02f0 debug registers */ - DWORD_PTR dr1; - DWORD_PTR dr2; - DWORD_PTR dr3; - DWORD_PTR dr6; - DWORD_PTR dr7; - void *exit_frame; /* 0320 exit frame pointer */ + DWORD_PTR dr0; /* 02f0 debug registers */ + DWORD_PTR dr1; /* 02f8 */ + DWORD_PTR dr2; /* 0300 */ + DWORD_PTR dr3; /* 0308 */ + DWORD_PTR dr6; /* 0310 */ + DWORD_PTR dr7; /* 0318 */ + void *exit_frame; /* 0320 exit frame pointer */ + struct syscall_frame *syscall_frame; /* 0328 syscall frame pointer */ }; C_ASSERT( sizeof(struct amd64_thread_data) <= sizeof(((struct ntdll_thread_data *)0)->cpu_data) ); C_ASSERT( offsetof( TEB, GdiTebBatch ) + offsetof( struct amd64_thread_data, exit_frame ) == 0x320 ); +C_ASSERT( offsetof( TEB, GdiTebBatch ) + offsetof( struct amd64_thread_data, syscall_frame ) == 0x328 ); static inline struct amd64_thread_data *amd64_thread_data(void) { diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index cb0b80a6f7..09cb320b5d 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1496,10 +1496,31 @@ void output_syscalls( DLLSPEC *spec ) output_cfi( ".cfi_rel_offset %%rbp,0" ); output( "\tmovq %%rsp,%%rbp\n" ); output_cfi( ".cfi_def_cfa_register %%rbp" ); - output( "\tpushq %%rsi\n" ); - output_cfi( ".cfi_rel_offset %%rsi,-8" ); - output( "\tpushq %%rdi\n" ); - output_cfi( ".cfi_rel_offset %%rdi,-16" ); + output( "\tleaq -0xe8(%%rbp),%%rsp\n" ); + output( "\tmovq %%gs:0x30,%%rcx\n" ); + output( "\tpushq 0x328(%%rcx)\n" ); /* amd64_thread_data()->syscall_frame */ + output( "\tmovq %%rsp,0x328(%%rcx)\n" ); + output( "\tmovdqu %%xmm6,-0xe0(%%rbp)\n" ); + output( "\tmovdqu %%xmm7,-0xd0(%%rbp)\n" ); + output( "\tmovdqu %%xmm8,-0xc0(%%rbp)\n" ); + output( "\tmovdqu %%xmm9,-0xb0(%%rbp)\n" ); + output( "\tmovdqu %%xmm10,-0xa0(%%rbp)\n" ); + output( "\tmovdqu %%xmm11,-0x90(%%rbp)\n" ); + output( "\tmovdqu %%xmm12,-0x80(%%rbp)\n" ); + output( "\tmovdqu %%xmm13,-0x70(%%rbp)\n" ); + output( "\tmovdqu %%xmm14,-0x60(%%rbp)\n" ); + output( "\tmovdqu %%xmm15,-0x50(%%rbp)\n" ); + output( "\tstmxcsr -0x40(%%rbp)\n" ); + output( "\tmovq %%r12,-0x38(%%rbp)\n" ); + output( "\tmovq %%r13,-0x30(%%rbp)\n" ); + output( "\tmovq %%r14,-0x28(%%rbp)\n" ); + output( "\tmovq %%r15,-0x20(%%rbp)\n" ); + output( "\tmovq %%rdi,-0x18(%%rbp)\n" ); + output_cfi( ".cfi_rel_offset %%rdi,-24" ); + output( "\tmovq %%rsi,-0x10(%%rbp)\n" ); + output_cfi( ".cfi_rel_offset %%rsi,-16" ); + output( "\tmovq %%rbx,-0x08(%%rbp)\n" ); + output_cfi( ".cfi_rel_offset %%rbx,-8" ); /* Legends of Runeterra hooks the first system call return instruction, and * depends on us returning to it. Adjust the return address accordingly. */ output( "\tsubq $0xb,0x8(%%rbp)\n" ); @@ -1522,13 +1543,17 @@ void output_syscalls( DLLSPEC *spec ) output( "\tsubq $0x20,%%rsp\n" ); output( "\tleaq .Lsyscall_table(%%rip),%%r10\n" ); output( "\tcallq *(%%r10,%%rax,8)\n" ); - output( "3:\tleaq -0x10(%%rbp),%%rsp\n" ); - output( "\tpopq %%rdi\n" ); + output( "3:\tpushq -0xf0(%%rbp)\n" ); + output( "\tmovq %%gs:0x30,%%rcx\n" ); + output( "\tpopq 0x328(%%rcx)\n" ); /* prev frame */ + output( "\tmovq -0x18(%%rbp),%%rdi\n" ); output_cfi( ".cfi_same_value %%rdi" ); - output( "\tpopq %%rsi\n" ); + output( "\tmovq -0x10(%%rbp),%%rsi\n" ); output_cfi( ".cfi_same_value %%rsi" ); + output( "\tmovq -0x8(%%rbp),%%rbx\n" ); + output_cfi( ".cfi_same_value %%rbx" ); output_cfi( ".cfi_def_cfa_register %%rsp" ); - output( "\tpopq %%rbp\n" ); + output( "\tleave\n" ); output_cfi( ".cfi_adjust_cfa_offset -8" ); output_cfi( ".cfi_same_value %%rbp" ); output( "\tret\n" );
1
0
0
0
Alexandre Julliard : winebuild: Store the syscall frame in the thread data on i386.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 8e3b5183cc79b99ac74e2cb3f665f8e46a076495 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8e3b5183cc79b99ac74e2cb3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 28 13:00:50 2020 +0200 winebuild: Store the syscall frame in the thread data on i386. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/signal_i386.c | 14 +++++++++++++- tools/winebuild/import.c | 15 +++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index a258c5d8dc..519c1a76d9 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -473,6 +473,17 @@ enum i386_trap_code #endif }; +struct syscall_frame +{ + struct syscall_frame *prev_frame; + DWORD edi; + DWORD esi; + DWORD ebx; + DWORD ebp; + DWORD thunk_addr; + DWORD ret_addr; +}; + struct x86_thread_data { DWORD fs; /* 1d4 TEB selector */ @@ -484,12 +495,13 @@ struct x86_thread_data DWORD dr6; /* 1ec */ DWORD dr7; /* 1f0 */ void *exit_frame; /* 1f4 exit frame pointer */ - /* the ntdll_thread_data structure follows here */ + struct syscall_frame *syscall_frame; /* 1f8 frame pointer on syscall entry */ }; C_ASSERT( sizeof(struct x86_thread_data) <= sizeof(((struct ntdll_thread_data *)0)->cpu_data) ); C_ASSERT( offsetof( TEB, GdiTebBatch ) + offsetof( struct x86_thread_data, gs ) == 0x1d8 ); C_ASSERT( offsetof( TEB, GdiTebBatch ) + offsetof( struct x86_thread_data, exit_frame ) == 0x1f4 ); +C_ASSERT( offsetof( TEB, GdiTebBatch ) + offsetof( struct x86_thread_data, syscall_frame ) == 0x1f8 ); static inline struct x86_thread_data *x86_thread_data(void) { diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 278de20522..cb0b80a6f7 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1446,10 +1446,14 @@ void output_syscalls( DLLSPEC *spec ) output_cfi( ".cfi_rel_offset %%ebp,0\n" ); output( "\tmovl %%esp,%%ebp\n" ); output_cfi( ".cfi_def_cfa_register %%ebp\n" ); + output( "\tpushl %%ebx\n" ); + output_cfi( ".cfi_rel_offset %%ebx,-4\n" ); output( "\tpushl %%esi\n" ); - output_cfi( ".cfi_rel_offset %%esi,-4\n" ); + output_cfi( ".cfi_rel_offset %%esi,-8\n" ); output( "\tpushl %%edi\n" ); - output_cfi( ".cfi_rel_offset %%edi,-8\n" ); + output_cfi( ".cfi_rel_offset %%edi,-12\n" ); + output( "\tpushl %%fs:0x1f8\n" ); /* x86_thread_data()->syscall_frame */ + output( "\tmovl %%esp,%%fs:0x1f8\n" ); output( "\tcmpl $%u,%%eax\n", count ); output( "\tjae 3f\n" ); if (UsePIC) @@ -1471,11 +1475,14 @@ void output_syscalls( DLLSPEC *spec ) output( "\tcall *.Lsyscall_table-1b(%%eax,%%edx,4)\n" ); else output( "\tcall *.Lsyscall_table(,%%eax,4)\n" ); - output( "\tleal -8(%%ebp),%%esp\n" ); - output( "2:\tpopl %%edi\n" ); + output( "\tleal -16(%%ebp),%%esp\n" ); + output( "2:\tpopl %%fs:0x1f8\n" ); + output( "\tpopl %%edi\n" ); output_cfi( ".cfi_same_value %%edi\n" ); output( "\tpopl %%esi\n" ); output_cfi( ".cfi_same_value %%esi\n" ); + output( "\tpopl %%ebx\n" ); + output_cfi( ".cfi_same_value %%ebx\n" ); output( "\tpopl %%ebp\n" ); output_cfi( ".cfi_def_cfa %%esp,4\n" ); output_cfi( ".cfi_same_value %%ebp\n" );
1
0
0
0
Zebediah Figura : dsdmo: Implement IDirectSoundFXParamEq parameters methods.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 3ba24075f2740d379824edef7f56d3b0c73f6577 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3ba24075f2740d379824edef…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jul 27 20:26:05 2020 -0500 dsdmo: Implement IDirectSoundFXParamEq parameters methods. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dsdmo/main.c | 19 +++++++++++++++---- dlls/dsdmo/tests/dsdmo.c | 28 +++++++++++++++++++++------- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index ff103be159..57214b3275 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -438,6 +438,7 @@ struct eq { struct effect effect; IDirectSoundFXParamEq IDirectSoundFXParamEq_iface; + DSFXParamEq params; }; static struct eq *impl_from_IDirectSoundFXParamEq(IDirectSoundFXParamEq *iface) @@ -467,18 +468,24 @@ static HRESULT WINAPI eq_params_SetAllParameters(IDirectSoundFXParamEq *iface, c { struct eq *effect = impl_from_IDirectSoundFXParamEq(iface); - FIXME("effect %p, params %p, stub!\n", effect, params); + TRACE("effect %p, params %p.\n", effect, params); - return E_NOTIMPL; + EnterCriticalSection(&effect->effect.cs); + effect->params = *params; + LeaveCriticalSection(&effect->effect.cs); + return S_OK; } static HRESULT WINAPI eq_params_GetAllParameters(IDirectSoundFXParamEq *iface, DSFXParamEq *params) { struct eq *effect = impl_from_IDirectSoundFXParamEq(iface); - FIXME("effect %p, params %p, stub!\n", effect, params); + TRACE("effect %p, params %p.\n", effect, params); - return E_NOTIMPL; + EnterCriticalSection(&effect->effect.cs); + *params = effect->params; + LeaveCriticalSection(&effect->effect.cs); + return S_OK; } static const IDirectSoundFXParamEqVtbl eq_params_vtbl = @@ -527,6 +534,10 @@ static HRESULT eq_create(IUnknown *outer, IUnknown **out) effect_init(&object->effect, outer, &eq_ops); object->IDirectSoundFXParamEq_iface.lpVtbl = &eq_params_vtbl; + object->params.fCenter = 8000.0f; + object->params.fBandwidth = 12.0f; + object->params.fGain = 0.0f; + TRACE("Created equalizer effect %p.\n", object); *out = &object->effect.IUnknown_inner; return S_OK; diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index c59361e5fc..1ecafeb7ce 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -453,13 +453,27 @@ static void test_eq_parameters(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IDirectSoundFXParamEq_GetAllParameters(eq, ¶ms); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - ok(params.fCenter == 8000.0f, "Got center frequency %.8e Hz.\n", params.fCenter); - ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth); - ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain); - } + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(params.fCenter == 8000.0f, "Got center frequency %.8e Hz.\n", params.fCenter); + ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth); + ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain); + + params.fCenter = 79.0f; + hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + params.fCenter = 16001.0f; + hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + params.fCenter = 738.0f; + hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + memset(¶ms, 0xcc, sizeof(params)); + hr = IDirectSoundFXParamEq_GetAllParameters(eq, ¶ms); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(params.fCenter == 738.0f, "Got center frequency %.8e Hz.\n", params.fCenter); + ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth); + ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain); ref = IDirectSoundFXParamEq_Release(eq); ok(!ref, "Got outstanding refcount %d.\n", ref);
1
0
0
0
Zebediah Figura : dsdmo: Stub IDirectSoundFXParamEq.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 861cfee25db57d4b89adb5efcf0215722fc462d2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=861cfee25db57d4b89adb5ef…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jul 27 20:26:04 2020 -0500 dsdmo: Stub IDirectSoundFXParamEq. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dsdmo/main.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ dlls/dsdmo/tests/dsdmo.c | 17 +++++++------- dlls/dsound/tests/dsound8.c | 10 ++++---- 3 files changed, 69 insertions(+), 14 deletions(-) diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 482b8202db..ff103be159 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -437,6 +437,57 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff struct eq { struct effect effect; + IDirectSoundFXParamEq IDirectSoundFXParamEq_iface; +}; + +static struct eq *impl_from_IDirectSoundFXParamEq(IDirectSoundFXParamEq *iface) +{ + return CONTAINING_RECORD(iface, struct eq, IDirectSoundFXParamEq_iface); +} + +static HRESULT WINAPI eq_params_QueryInterface(IDirectSoundFXParamEq *iface, REFIID iid, void **out) +{ + struct eq *effect = impl_from_IDirectSoundFXParamEq(iface); + return IUnknown_QueryInterface(effect->effect.outer_unk, iid, out); +} + +static ULONG WINAPI eq_params_AddRef(IDirectSoundFXParamEq *iface) +{ + struct eq *effect = impl_from_IDirectSoundFXParamEq(iface); + return IUnknown_AddRef(effect->effect.outer_unk); +} + +static ULONG WINAPI eq_params_Release(IDirectSoundFXParamEq *iface) +{ + struct eq *effect = impl_from_IDirectSoundFXParamEq(iface); + return IUnknown_Release(effect->effect.outer_unk); +} + +static HRESULT WINAPI eq_params_SetAllParameters(IDirectSoundFXParamEq *iface, const DSFXParamEq *params) +{ + struct eq *effect = impl_from_IDirectSoundFXParamEq(iface); + + FIXME("effect %p, params %p, stub!\n", effect, params); + + return E_NOTIMPL; +} + +static HRESULT WINAPI eq_params_GetAllParameters(IDirectSoundFXParamEq *iface, DSFXParamEq *params) +{ + struct eq *effect = impl_from_IDirectSoundFXParamEq(iface); + + FIXME("effect %p, params %p, stub!\n", effect, params); + + return E_NOTIMPL; +} + +static const IDirectSoundFXParamEqVtbl eq_params_vtbl = +{ + eq_params_QueryInterface, + eq_params_AddRef, + eq_params_Release, + eq_params_SetAllParameters, + eq_params_GetAllParameters, }; static struct eq *impl_eq_from_effect(struct effect *iface) @@ -446,6 +497,10 @@ static struct eq *impl_eq_from_effect(struct effect *iface) static void *eq_query_interface(struct effect *iface, REFIID iid) { + struct eq *effect = impl_eq_from_effect(iface); + + if (IsEqualGUID(iid, &IID_IDirectSoundFXParamEq)) + return &effect->IDirectSoundFXParamEq_iface; return NULL; } @@ -470,6 +525,7 @@ static HRESULT eq_create(IUnknown *outer, IUnknown **out) return E_OUTOFMEMORY; effect_init(&object->effect, outer, &eq_ops); + object->IDirectSoundFXParamEq_iface.lpVtbl = &eq_params_vtbl; TRACE("Created equalizer effect %p.\n", object); *out = &object->effect.IUnknown_inner; diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index 349e300f02..c59361e5fc 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -450,15 +450,16 @@ static void test_eq_parameters(void) hr = CoCreateInstance(&GUID_DSFX_STANDARD_PARAMEQ, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXParamEq, (void **)&eq); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (hr != S_OK) - return; + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IDirectSoundFXParamEq_GetAllParameters(eq, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(params.fCenter == 8000.0f, "Got center frequency %.8e Hz.\n", params.fCenter); - ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth); - ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + if (hr == S_OK) + { + ok(params.fCenter == 8000.0f, "Got center frequency %.8e Hz.\n", params.fCenter); + ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth); + ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain); + } ref = IDirectSoundFXParamEq_Release(eq); ok(!ref, "Got outstanding refcount %d.\n", ref); @@ -526,7 +527,7 @@ START_TEST(dsdmo) {&GUID_DSFX_STANDARD_FLANGER, &IID_IDirectSoundFXFlanger, TRUE}, {&GUID_DSFX_STANDARD_GARGLE, &IID_IDirectSoundFXGargle, TRUE}, {&GUID_DSFX_STANDARD_I3DL2REVERB, &IID_IDirectSoundFXI3DL2Reverb}, - {&GUID_DSFX_STANDARD_PARAMEQ, &IID_IDirectSoundFXParamEq, TRUE}, + {&GUID_DSFX_STANDARD_PARAMEQ, &IID_IDirectSoundFXParamEq}, {&GUID_DSFX_WAVES_REVERB, &IID_IDirectSoundFXWavesReverb}, }; unsigned int i; diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 05dfabbd25..fcac31ba63 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -1724,15 +1724,13 @@ static void test_effects(void) todo_wine ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXParamEq, (void **)&unk); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - IUnknown_Release(unk); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + IUnknown_Release(unk); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXParamEq, (void **)&unk); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - IUnknown_Release(unk); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + IUnknown_Release(unk); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk);
1
0
0
0
Zebediah Figura : dsdmo: Add a stub equalizer effect.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: ac528a492b719f6a8759d919710ca733f5acf167 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ac528a492b719f6a8759d919…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jul 27 20:26:03 2020 -0500 dsdmo: Add a stub equalizer effect. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dsdmo/dsdmo.idl | 8 +++++ dlls/dsdmo/main.c | 43 +++++++++++++++++++++++++++ dlls/dsound/tests/dsound8.c | 71 ++++++++++++++++++--------------------------- 3 files changed, 80 insertions(+), 42 deletions(-) diff --git a/dlls/dsdmo/dsdmo.idl b/dlls/dsdmo/dsdmo.idl index e5735b42f7..7f17208482 100644 --- a/dlls/dsdmo/dsdmo.idl +++ b/dlls/dsdmo/dsdmo.idl @@ -26,6 +26,14 @@ ] coclass DirectSoundI3DL2ReverbDMO {} +[ + threading(both), + progid("Microsoft.DirectSoundParamEqDMO.1"), + vi_progid("Microsoft.DirectSoundParamEqDMO"), + uuid(120ced89-3bf4-4173-a132-3cb406cf3231) +] +coclass DirectSoundParamEqDMO {} + [ threading(both), progid("Microsoft.DirectSoundWavesReverbDMO.1"), diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 5755c6f144..482b8202db 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -434,6 +434,48 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff effect->ops = ops; } +struct eq +{ + struct effect effect; +}; + +static struct eq *impl_eq_from_effect(struct effect *iface) +{ + return CONTAINING_RECORD(iface, struct eq, effect); +} + +static void *eq_query_interface(struct effect *iface, REFIID iid) +{ + return NULL; +} + +static void eq_destroy(struct effect *iface) +{ + struct eq *effect = impl_eq_from_effect(iface); + + free(effect); +} + +static const struct effect_ops eq_ops = +{ + .destroy = eq_destroy, + .query_interface = eq_query_interface, +}; + +static HRESULT eq_create(IUnknown *outer, IUnknown **out) +{ + struct eq *object; + + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; + + effect_init(&object->effect, outer, &eq_ops); + + TRACE("Created equalizer effect %p.\n", object); + *out = &object->effect.IUnknown_inner; + return S_OK; +} + struct reverb { struct effect effect; @@ -787,6 +829,7 @@ static struct class_factories[] = { {&GUID_DSFX_STANDARD_I3DL2REVERB, {{&class_factory_vtbl}, reverb_create}}, + {&GUID_DSFX_STANDARD_PARAMEQ, {{&class_factory_vtbl}, eq_create}}, {&GUID_DSFX_WAVES_REVERB, {{&class_factory_vtbl}, waves_reverb_create}}, }; diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 702cd4b2ba..05dfabbd25 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -1617,8 +1617,8 @@ static void test_effects(void) results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); hr = IDirectSoundBuffer8_Lock(buffer8, 0, 0, &ptr1, &size1, &ptr2, &size2, DSBLOCK_ENTIREBUFFER); ok(hr == DS_OK, "Got hr %#x.\n", hr); @@ -1648,38 +1648,33 @@ static void test_effects(void) effects[0].guidDSFXClass = GUID_DSFX_STANDARD_PARAMEQ; results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, NULL); - todo_wine ok(hr == DSERR_INVALIDPARAM, "Got hr %#x.\n", hr); + ok(hr == DSERR_INVALIDPARAM, "Got hr %#x.\n", hr); dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &GUID_NULL, (void **)&dmo); - todo_wine ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); - todo_wine ok(!dmo, "Got object %p.\n", dmo); + ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(!dmo, "Got object %p.\n", dmo); dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_NULL, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); + ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); ok(dmo == (IMediaObject *)0xdeadbeef, "Got object %p.\n", dmo); dmo = NULL; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - { - ok(!!dmo, "Expected a non-NULL object.\n"); - IMediaObject_Release(dmo); - } + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(!!dmo, "Expected a non-NULL object.\n"); + IMediaObject_Release(dmo); dmo = NULL; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_PARAMEQ, 0, &IID_IMediaObject, (void **)&dmo); - if (hr == DS_OK) - { - ok(!!dmo, "Expected a non-NULL object.\n"); - IMediaObject_Release(dmo); - } + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(!!dmo, "Expected a non-NULL object.\n"); + IMediaObject_Release(dmo); dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IMediaObject, (void **)&dmo); @@ -1691,7 +1686,7 @@ static void test_effects(void) results[0] = results[1] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 2, effects, results); ok(hr == REGDB_E_CLASSNOTREG, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_PRESENT, "Got result %#x.\n", results[0]); + ok(results[0] == DSFXR_PRESENT, "Got result %#x.\n", results[0]); ok(results[1] == DSFXR_UNKNOWN, "Got result %#x.\n", results[1]); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); @@ -1701,14 +1696,13 @@ static void test_effects(void) effects[1].guidDSFXClass = GUID_DSFX_STANDARD_I3DL2REVERB; results[0] = results[1] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 2, effects, results); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); - todo_wine ok(results[1] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[1]); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + ok(results[1] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[1]); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_PARAMEQ, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - echo = dmo; + ok(hr == DS_OK, "Got hr %#x.\n", hr); + echo = dmo; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_I3DL2REVERB, 0, &IID_IMediaObject, (void **)&dmo); todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); @@ -1716,20 +1710,14 @@ static void test_effects(void) reverb = dmo; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - { - ok(dmo == echo, "Expected %p, got %p.\n", echo, dmo); - IMediaObject_Release(dmo); - } + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(dmo == echo, "Expected %p, got %p.\n", echo, dmo); + IMediaObject_Release(dmo); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - { - ok(dmo == reverb, "Expected %p, got %p.\n", reverb, dmo); - IMediaObject_Release(dmo); - } + ok(hr == DS_OK, "Got hr %#x.\n", hr); + todo_wine ok(dmo == reverb, "Expected %p, got %p.\n", reverb, dmo); + IMediaObject_Release(dmo); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_I3DL2REVERB, 1, &IID_IMediaObject, (void **)&dmo); @@ -1748,13 +1736,12 @@ static void test_effects(void) hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk); - todo_wine ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - IUnknown_Release(unk); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + IUnknown_Release(unk); hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_I3DL2REVERB, 0, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk);
1
0
0
0
Zebediah Figura : dsdmo: Implement IDirectSoundFXI3DL2Reverb parameters methods.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: baddd55817c4d8560aa86dea4c06d6bd4e00e129 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=baddd55817c4d8560aa86dea…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jul 27 20:26:02 2020 -0500 dsdmo: Implement IDirectSoundFXI3DL2Reverb parameters methods. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dsdmo/main.c | 28 ++++++++++++++++++++++++---- dlls/dsdmo/tests/dsdmo.c | 44 ++++++++++++++++++++++++++++---------------- 2 files changed, 52 insertions(+), 20 deletions(-) diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 8efef855b2..5755c6f144 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -438,6 +438,7 @@ struct reverb { struct effect effect; IDirectSoundFXI3DL2Reverb IDirectSoundFXI3DL2Reverb_iface; + DSFXI3DL2Reverb params; }; static struct reverb *impl_from_IDirectSoundFXI3DL2Reverb(IDirectSoundFXI3DL2Reverb *iface) @@ -467,18 +468,24 @@ static HRESULT WINAPI reverb_params_SetAllParameters(IDirectSoundFXI3DL2Reverb * { struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); - FIXME("effect %p, params %p, stub!\n", effect, params); + TRACE("effect %p, params %p.\n", effect, params); - return E_NOTIMPL; + EnterCriticalSection(&effect->effect.cs); + effect->params = *params; + LeaveCriticalSection(&effect->effect.cs); + return S_OK; } static HRESULT WINAPI reverb_params_GetAllParameters(IDirectSoundFXI3DL2Reverb *iface, DSFXI3DL2Reverb *params) { struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); - FIXME("effect %p, params %p, stub!\n", effect, params); + TRACE("effect %p, params %p.\n", effect, params); - return E_NOTIMPL; + EnterCriticalSection(&effect->effect.cs); + *params = effect->params; + LeaveCriticalSection(&effect->effect.cs); + return S_OK; } static HRESULT WINAPI reverb_params_SetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD preset) @@ -567,6 +574,19 @@ static HRESULT reverb_create(IUnknown *outer, IUnknown **out) effect_init(&object->effect, outer, &reverb_ops); object->IDirectSoundFXI3DL2Reverb_iface.lpVtbl = &reverb_params_vtbl; + object->params.lRoom = DSFX_I3DL2REVERB_ROOM_DEFAULT; + object->params.lRoomHF = DSFX_I3DL2REVERB_ROOMHF_DEFAULT; + object->params.flRoomRolloffFactor = DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT; + object->params.flDecayTime = DSFX_I3DL2REVERB_DECAYTIME_DEFAULT; + object->params.flDecayHFRatio = DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT; + object->params.lReflections = DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT; + object->params.flReflectionsDelay = DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT; + object->params.lReverb = DSFX_I3DL2REVERB_REVERB_DEFAULT; + object->params.flReverbDelay = DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT; + object->params.flDiffusion = DSFX_I3DL2REVERB_DIFFUSION_DEFAULT; + object->params.flDensity = DSFX_I3DL2REVERB_DENSITY_DEFAULT; + object->params.flHFReference = DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT; + TRACE("Created I3DL2 reverb effect %p.\n", object); *out = &object->effect.IUnknown_inner; return S_OK; diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index f949d02e88..349e300f02 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -476,22 +476,34 @@ static void test_reverb_parameters(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); - ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); - ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); - ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); - ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); - ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); - ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); - ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); - ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); - ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); - ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); - ok(params.flHFReference == 5000.0f, "Got reference high frequency %.8e Hz.\n", params.flHFReference); - } + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); + ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); + ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); + ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); + ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); + ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); + ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); + ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); + ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); + ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); + ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); + ok(params.flHFReference == 5000.0f, "Got reference high frequency %.8e Hz.\n", params.flHFReference); + + params.lRoom = -10001; + hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + params.lRoom = 1; + hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + params.lRoom = -900; + hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + memset(¶ms, 0xcc, sizeof(params)); + hr = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(params.lRoom == -900, "Got room attenuation %d mB.\n", params.lRoom); ref = IDirectSoundFXI3DL2Reverb_Release(reverb); ok(!ref, "Got outstanding refcount %d.\n", ref);
1
0
0
0
Zebediah Figura : dsdmo: Stub IDirectSoundFXI3DL2Reverb.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 9faa7af99a1e3cb2acf49e607974f57400664ee2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9faa7af99a1e3cb2acf49e60…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jul 27 20:26:01 2020 -0500 dsdmo: Stub IDirectSoundFXI3DL2Reverb. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dsdmo/main.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/dsdmo/tests/dsdmo.c | 35 +++++++++--------- 2 files changed, 114 insertions(+), 17 deletions(-) diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index f42d29f58b..8efef855b2 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -437,6 +437,97 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff struct reverb { struct effect effect; + IDirectSoundFXI3DL2Reverb IDirectSoundFXI3DL2Reverb_iface; +}; + +static struct reverb *impl_from_IDirectSoundFXI3DL2Reverb(IDirectSoundFXI3DL2Reverb *iface) +{ + return CONTAINING_RECORD(iface, struct reverb, IDirectSoundFXI3DL2Reverb_iface); +} + +static HRESULT WINAPI reverb_params_QueryInterface(IDirectSoundFXI3DL2Reverb *iface, REFIID iid, void **out) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + return IUnknown_QueryInterface(effect->effect.outer_unk, iid, out); +} + +static ULONG WINAPI reverb_params_AddRef(IDirectSoundFXI3DL2Reverb *iface) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + return IUnknown_AddRef(effect->effect.outer_unk); +} + +static ULONG WINAPI reverb_params_Release(IDirectSoundFXI3DL2Reverb *iface) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + return IUnknown_Release(effect->effect.outer_unk); +} + +static HRESULT WINAPI reverb_params_SetAllParameters(IDirectSoundFXI3DL2Reverb *iface, const DSFXI3DL2Reverb *params) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, params %p, stub!\n", effect, params); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_GetAllParameters(IDirectSoundFXI3DL2Reverb *iface, DSFXI3DL2Reverb *params) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, params %p, stub!\n", effect, params); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_SetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD preset) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, preset %u, stub!\n", effect, preset); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_GetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD *preset) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, preset %p, stub!\n", effect, preset); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_SetQuality(IDirectSoundFXI3DL2Reverb *iface, LONG quality) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, quality %u, stub!\n", effect, quality); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_GetQuality(IDirectSoundFXI3DL2Reverb *iface, LONG *quality) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, quality %p, stub!\n", effect, quality); + + return E_NOTIMPL; +} + +static const IDirectSoundFXI3DL2ReverbVtbl reverb_params_vtbl = +{ + reverb_params_QueryInterface, + reverb_params_AddRef, + reverb_params_Release, + reverb_params_SetAllParameters, + reverb_params_GetAllParameters, + reverb_params_SetPreset, + reverb_params_GetPreset, + reverb_params_SetQuality, + reverb_params_GetQuality, }; static struct reverb *impl_reverb_from_effect(struct effect *iface) @@ -446,6 +537,10 @@ static struct reverb *impl_reverb_from_effect(struct effect *iface) static void *reverb_query_interface(struct effect *iface, REFIID iid) { + struct reverb *effect = impl_reverb_from_effect(iface); + + if (IsEqualGUID(iid, &IID_IDirectSoundFXI3DL2Reverb)) + return &effect->IDirectSoundFXI3DL2Reverb_iface; return NULL; } @@ -470,6 +565,7 @@ static HRESULT reverb_create(IUnknown *outer, IUnknown **out) return E_OUTOFMEMORY; effect_init(&object->effect, outer, &reverb_ops); + object->IDirectSoundFXI3DL2Reverb_iface.lpVtbl = &reverb_params_vtbl; TRACE("Created I3DL2 reverb effect %p.\n", object); *out = &object->effect.IUnknown_inner; diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index 9026728f6c..f949d02e88 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -473,24 +473,25 @@ static void test_reverb_parameters(void) hr = CoCreateInstance(&GUID_DSFX_STANDARD_I3DL2REVERB, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXI3DL2Reverb, (void **)&reverb); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (hr != S_OK) - return; + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); - ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); - ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); - ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); - ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); - ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); - ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); - ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); - ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); - ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); - ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); - ok(params.flHFReference == 5000.0f, "Got reference high frequency %.8e Hz.\n", params.flHFReference); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + if (hr == S_OK) + { + ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); + ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); + ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); + ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); + ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); + ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); + ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); + ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); + ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); + ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); + ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); + ok(params.flHFReference == 5000.0f, "Got reference high frequency %.8e Hz.\n", params.flHFReference); + } ref = IDirectSoundFXI3DL2Reverb_Release(reverb); ok(!ref, "Got outstanding refcount %d.\n", ref); @@ -512,7 +513,7 @@ START_TEST(dsdmo) {&GUID_DSFX_STANDARD_ECHO, &IID_IDirectSoundFXEcho, TRUE}, {&GUID_DSFX_STANDARD_FLANGER, &IID_IDirectSoundFXFlanger, TRUE}, {&GUID_DSFX_STANDARD_GARGLE, &IID_IDirectSoundFXGargle, TRUE}, - {&GUID_DSFX_STANDARD_I3DL2REVERB, &IID_IDirectSoundFXI3DL2Reverb, TRUE}, + {&GUID_DSFX_STANDARD_I3DL2REVERB, &IID_IDirectSoundFXI3DL2Reverb}, {&GUID_DSFX_STANDARD_PARAMEQ, &IID_IDirectSoundFXParamEq, TRUE}, {&GUID_DSFX_WAVES_REVERB, &IID_IDirectSoundFXWavesReverb}, };
1
0
0
0
Zebediah Figura : dsdmo: Add a stub I3DL2 reverb effect.
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: eb6709dab41e7b2efe528a47e80c2d01f98d7384 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb6709dab41e7b2efe528a47…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jul 27 20:26:00 2020 -0500 dsdmo: Add a stub I3DL2 reverb effect. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dsdmo/dsdmo.idl | 8 ++++++++ dlls/dsdmo/main.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/dlls/dsdmo/dsdmo.idl b/dlls/dsdmo/dsdmo.idl index a967186af3..e5735b42f7 100644 --- a/dlls/dsdmo/dsdmo.idl +++ b/dlls/dsdmo/dsdmo.idl @@ -18,6 +18,14 @@ #pragma makedep register +[ + threading(both), + progid("Microsoft.DirectSoundI3DL2ReverbDMO.1"), + vi_progid("Microsoft.DirectSoundI3DL2ReverbDMO"), + uuid(ef985e71-d5c7-42d4-ba4d-2d073e2e96f4) +] +coclass DirectSoundI3DL2ReverbDMO {} + [ threading(both), progid("Microsoft.DirectSoundWavesReverbDMO.1"), diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 1e992fe541..f42d29f58b 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -434,6 +434,48 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff effect->ops = ops; } +struct reverb +{ + struct effect effect; +}; + +static struct reverb *impl_reverb_from_effect(struct effect *iface) +{ + return CONTAINING_RECORD(iface, struct reverb, effect); +} + +static void *reverb_query_interface(struct effect *iface, REFIID iid) +{ + return NULL; +} + +static void reverb_destroy(struct effect *iface) +{ + struct reverb *effect = impl_reverb_from_effect(iface); + + free(effect); +} + +static const struct effect_ops reverb_ops = +{ + .destroy = reverb_destroy, + .query_interface = reverb_query_interface, +}; + +static HRESULT reverb_create(IUnknown *outer, IUnknown **out) +{ + struct reverb *object; + + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; + + effect_init(&object->effect, outer, &reverb_ops); + + TRACE("Created I3DL2 reverb effect %p.\n", object); + *out = &object->effect.IUnknown_inner; + return S_OK; +} + struct waves_reverb { struct effect effect; @@ -628,6 +670,7 @@ static struct } class_factories[] = { + {&GUID_DSFX_STANDARD_I3DL2REVERB, {{&class_factory_vtbl}, reverb_create}}, {&GUID_DSFX_WAVES_REVERB, {{&class_factory_vtbl}, waves_reverb_create}}, };
1
0
0
0
Gijs Vermeulen : wbemprox: Support retrieving more than one object in IEnumWbemClassObject::Next().
by Alexandre Julliard
28 Jul '20
28 Jul '20
Module: wine Branch: master Commit: 84d85adeea578cac37bded97984409f44c7985ba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=84d85adeea578cac37bded97…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Tue Jul 28 11:35:08 2020 +0200 wbemprox: Support retrieving more than one object in IEnumWbemClassObject::Next(). Patch by GitHub user pnevmoslon with some modifications. Fixes gamepad support in Mortal Kombat 11. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/class.c | 23 ++++++++++++++--------- dlls/wbemprox/tests/query.c | 12 ++++++------ 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index ba7720b098..db6017e0c9 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -116,24 +116,29 @@ static HRESULT WINAPI enum_class_object_Next( struct table *table; static int once = 0; HRESULT hr; + ULONG i, j; TRACE("%p, %d, %u, %p, %p\n", iface, lTimeout, uCount, apObjects, puReturned); - if (!uCount) return WBEM_S_FALSE; if (!apObjects || !puReturned) return WBEM_E_INVALID_PARAMETER; if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n"); *puReturned = 0; - if (ec->index >= view->result_count) return WBEM_S_FALSE; - table = get_view_table( view, ec->index ); - hr = create_class_object( table->name, iface, ec->index, NULL, apObjects ); - if (hr != S_OK) return hr; + for (i = 0; i < uCount; i++) + { + if (ec->index >= view->result_count) return WBEM_S_FALSE; + table = get_view_table( view, ec->index ); + hr = create_class_object( table->name, iface, ec->index, NULL, &apObjects[i] ); + if (hr != S_OK) + { + for (j = 0; j < i; j++) IWbemClassObject_Release( apObjects[j] ); + return hr; + } + ec->index++; + (*puReturned)++; + } - ec->index++; - *puReturned = 1; - if (ec->index == view->result_count && uCount > 1) return WBEM_S_FALSE; - if (uCount > 1) return WBEM_S_TIMEDOUT; return WBEM_S_NO_ERROR; } diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index e99e221c30..e48722f3bc 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -181,8 +181,8 @@ static void test_IEnumWbemClassObject_Next( IWbemServices *services ) count = 2; hr = IEnumWbemClassObject_Next( result, 10000, 0, &obj1, &count ); - todo_wine ok( hr == S_OK, "got %08x\n", hr ); - todo_wine ok( count == 0, "expected 0, got %u\n", count ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 0, "expected 0, got %u\n", count ); for (;;) { @@ -199,8 +199,8 @@ static void test_IEnumWbemClassObject_Next( IWbemServices *services ) count = 0; hr = IEnumWbemClassObject_Next( result, 10000, num_objects, obj, &count ); - todo_wine ok( hr == S_OK, "got %08x\n", hr ); - todo_wine ok( count == num_objects, "expected %u, got %u\n", num_objects, count ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == num_objects, "expected %u, got %u\n", num_objects, count ); for (i = 0; i < count; i++) IWbemClassObject_Release( obj[i] ); @@ -210,8 +210,8 @@ static void test_IEnumWbemClassObject_Next( IWbemServices *services ) count = 0; hr = IEnumWbemClassObject_Next( result, 10000, num_objects + 1, obj, &count ); - todo_wine ok( hr == S_FALSE, "got %08x\n", hr ); - todo_wine ok( count == num_objects, "expected %u, got %u\n", num_objects, count ); + ok( hr == S_FALSE, "got %08x\n", hr ); + ok( count == num_objects, "expected %u, got %u\n", num_objects, count ); for (i = 0; i < count; i++) IWbemClassObject_Release( obj[i] );
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
83
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
Results per page:
10
25
50
100
200