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
January 2006
----- 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
4 participants
617 discussions
Start a n
N
ew thread
Vitaliy Margolen : x11drv: Prevent NULL dereference in SelectionRequest handling.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: 6bc59056dc0e85ab985ca24e6129bff42b97683f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=6bc59056dc0e85ab985ca24…
Author: Vitaliy Margolen <wine-patch(a)kievinfo.com> Date: Fri Jan 20 19:41:40 2006 +0100 x11drv: Prevent NULL dereference in SelectionRequest handling. --- dlls/x11drv/clipboard.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/x11drv/clipboard.c b/dlls/x11drv/clipboard.c index 2d53a55..3821c2c 100644 --- a/dlls/x11drv/clipboard.c +++ b/dlls/x11drv/clipboard.c @@ -2795,7 +2795,7 @@ static Atom X11DRV_SelectionRequest_TARG */ cTargets = 1; /* Include TARGETS */ - lpData = ClipData; + if (!(lpData = ClipData)) return None; do {
1
0
0
0
H. Verbeet : ntdll: Add a stubbed NtSetSystemInformation.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: c1f52e001309d0a27f1e9fa7f195e257c42634ed URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=c1f52e001309d0a27f1e9fa…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Fri Jan 20 19:41:04 2006 +0100 ntdll: Add a stubbed NtSetSystemInformation. --- dlls/ntdll/nt.c | 9 +++++++++ dlls/ntdll/ntdll.spec | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 5d40c4c..6b6cccf 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -904,6 +904,15 @@ NTSTATUS WINAPI NtQuerySystemInformation return ret; } +/****************************************************************************** + * NtSetSystemInformation [NTDLL.@] + * ZwSetSystemInformation [NTDLL.@] + */ +NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation, ULONG Length) +{ + FIXME("(0x%08x,%p,0x%08lx) stub\n",SystemInformationClass,SystemInformation,Length); + return STATUS_SUCCESS; +} /****************************************************************************** * NtCreatePagingFile [NTDLL.@] diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 433ca6e..eb0ec0c 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -337,7 +337,7 @@ @ stdcall NtSetSecurityObject(long long ptr) @ stub NtSetSystemEnvironmentValue # @ stub NtSetSystemEnvironmentValueEx -@ stub NtSetSystemInformation +@ stdcall NtSetSystemInformation(long ptr long) @ stub NtSetSystemPowerState @ stdcall NtSetSystemTime(ptr ptr) # @ stub NtSetThreadExecutionState @@ -1179,7 +1179,7 @@ @ stdcall ZwSetSecurityObject(long long ptr) NtSetSecurityObject @ stub ZwSetSystemEnvironmentValue # @ stub ZwSetSystemEnvironmentValueEx -@ stub ZwSetSystemInformation +@ stdcall ZwSetSystemInformation(long ptr long) NtSetSystemInformation @ stub ZwSetSystemPowerState @ stdcall ZwSetSystemTime(ptr ptr) NtSetSystemTime # @ stub ZwSetThreadExecutionState
1
0
0
0
Alexandre Julliard : ntdll: Move the %gs register to the ntdll_thread_regs structure.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: 4ce433d82630b38d9f6d44c0fb377dbb88f4c16d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4ce433d82630b38d9f6d44c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 20 16:54:11 2006 +0100 ntdll: Move the %gs register to the ntdll_thread_regs structure. --- dlls/ntdll/ntdll_misc.h | 17 +++++++++-------- dlls/ntdll/signal_i386.c | 2 +- include/thread.h | 9 ++++----- tools/winebuild/relay.c | 9 ++++++--- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 992df1d..7932b50 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -136,14 +136,15 @@ static inline struct ntdll_thread_data * /* thread registers, stored in NtCurrentTeb()->SpareBytes1 */ struct ntdll_thread_regs { - DWORD fs; /* TEB selector */ - DWORD dr0; /* debug registers */ - DWORD dr1; - DWORD dr2; - DWORD dr3; - DWORD dr6; - DWORD dr7; - DWORD spare[3]; /* change this if you add fields! */ + DWORD fs; /* 00 TEB selector */ + DWORD gs; /* 04 libc selector; update winebuild if you move this! */ + DWORD dr0; /* 08 debug registers */ + DWORD dr1; /* 0c */ + DWORD dr2; /* 10 */ + DWORD dr3; /* 14 */ + DWORD dr6; /* 18 */ + DWORD dr7; /* 1c */ + DWORD spare[2]; /* 20 change this if you add fields! */ }; static inline struct ntdll_thread_regs *ntdll_get_thread_regs(void) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 11e9dc9..fcdccfd 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -675,7 +675,7 @@ inline static void *init_handler( const * SS is still non-system segment. This is why both CS and SS * are checked. */ - wine_set_gs( teb->gs_sel ); + wine_set_gs( thread_regs->gs ); stack = teb->WOW32Reserved; } #ifdef __HAVE_VM86 diff --git a/include/thread.h b/include/thread.h index d5f1914..13e87b8 100644 --- a/include/thread.h +++ b/include/thread.h @@ -53,12 +53,11 @@ typedef struct _TEB PVOID SystemReserved2[10]; /* 1d4 */ /* The following are Wine-specific fields (NT: GdiTebBatch) */ - DWORD gs_sel; /* 1fc %gs selector for this thread */ - ULONG_PTR num_async_io; /* 200 number of pending async I/O in the server */ - DWORD dpmi_vif; /* 204 protected mode virtual interrupt flag */ - DWORD vm86_pending; /* 208 data for vm86 mode */ + DWORD num_async_io; /* 1fc number of pending async I/O in the server */ + ULONG_PTR dpmi_vif; /* 200 protected mode virtual interrupt flag */ + DWORD vm86_pending; /* 204 data for vm86 mode */ /* here is plenty space for wine specific fields (don't forget to change pad6!!) */ - DWORD pad6[308]; /* 20c */ + DWORD pad6[309]; /* 208 */ ULONG gdiRgn; /* 6dc */ ULONG gdiPen; /* 6e0 */ diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 60ed6cc..5dbbe83 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -32,6 +32,9 @@ #include "build.h" +/* fix this if the ntdll_thread_regs structure is changed */ +#define GS_OFFSET 0x1b0 /* STRUCTOFFSET(TEB,SpareBytes1) + STRUCTOFFSET(ntdll_thread_regs,gs) */ + static void function_header( FILE *outfile, const char *name ) { fprintf( outfile, "\n\t.align %d\n", get_alignment(4) ); @@ -150,7 +153,7 @@ static void BuildCallFrom16Core( FILE *o else fprintf( outfile, "\tmovw %s, %%fs\n", asm_name("CallTo16_TebSelector") ); - fprintf( outfile, "\t.byte 0x64\n\tmov (%d),%%gs\n", STRUCTOFFSET(TEB,gs_sel) ); + fprintf( outfile, "\t.byte 0x64\n\tmov (%d),%%gs\n", GS_OFFSET ); /* Translate STACK16FRAME base to flat offset in %edx */ fprintf( outfile, "\tmovw %%ss, %%dx\n" ); @@ -393,7 +396,7 @@ static void BuildCallTo16Core( FILE *out fprintf( outfile, "\tpushl %%ebx\n" ); fprintf( outfile, "\tpushl %%esi\n" ); fprintf( outfile, "\tpushl %%edi\n" ); - fprintf( outfile, "\t.byte 0x64\n\tmov %%gs,(%d)\n", STRUCTOFFSET(TEB,gs_sel) ); + fprintf( outfile, "\t.byte 0x64\n\tmov %%gs,(%d)\n", GS_OFFSET ); /* Setup exception frame */ fprintf( outfile, "\t.byte 0x64\n\tpushl (%d)\n", STACKOFFSET ); @@ -542,7 +545,7 @@ static void BuildRet16Func( FILE *outfil fprintf( outfile, "\t.byte 0x2e\n\tmov %s", asm_name("CallTo16_TebSelector") ); fprintf( outfile, "-%s,%%fs\n", asm_name("__wine_call16_start") ); - fprintf( outfile, "\t.byte 0x64\n\tmov (%d),%%gs\n", STRUCTOFFSET(TEB,gs_sel) ); + fprintf( outfile, "\t.byte 0x64\n\tmov (%d),%%gs\n", GS_OFFSET ); /* Restore the 32-bit stack */
1
0
0
0
Alexandre Julliard : ntdll: Move the TEB register to the ntdll_thread_regs structure.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: a19e3eeb20fb3295f49352ad28a2e34c3a01dd92 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=a19e3eeb20fb3295f49352a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 20 16:18:06 2006 +0100 ntdll: Move the TEB register to the ntdll_thread_regs structure. --- dlls/ntdll/ntdll_misc.h | 6 +++--- dlls/ntdll/signal_i386.c | 4 ++-- dlls/ntdll/thread.c | 30 ++++++++++++++++++++---------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index c63b700..992df1d 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -119,14 +119,13 @@ struct debug_info struct ntdll_thread_data { - DWORD teb_sel; /* selector to TEB */ struct debug_info *debug_info; /* info for debugstr functions */ int request_fd; /* fd for sending server requests */ int reply_fd; /* fd for receiving server replies */ int wait_fd[2]; /* fd for sleeping server requests */ void *vm86_ptr; /* data for vm86 mode */ - void *pad[3]; /* change this if you add fields! */ + void *pad[4]; /* change this if you add fields! */ }; static inline struct ntdll_thread_data *ntdll_get_thread_data(void) @@ -137,13 +136,14 @@ static inline struct ntdll_thread_data * /* thread registers, stored in NtCurrentTeb()->SpareBytes1 */ struct ntdll_thread_regs { + DWORD fs; /* TEB selector */ DWORD dr0; /* debug registers */ DWORD dr1; DWORD dr2; DWORD dr3; DWORD dr6; DWORD dr7; - DWORD spare[4]; /* change this if you add fields! */ + DWORD spare[3]; /* change this if you add fields! */ }; static inline struct ntdll_thread_regs *ntdll_get_thread_regs(void) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 1b2e8f0..11e9dc9 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -648,7 +648,7 @@ inline static void *init_handler( const { void *stack = (void *)ESP_sig(sigcontext); TEB *teb = get_current_teb(); - struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SystemReserved2; + struct ntdll_thread_regs *thread_regs = (struct ntdll_thread_regs *)teb->SpareBytes1; /* get %fs and %gs at time of the fault */ #ifdef FS_sig @@ -662,7 +662,7 @@ inline static void *init_handler( const *gs = wine_get_gs(); #endif - wine_set_fs( thread_data->teb_sel ); + wine_set_fs( thread_regs->fs ); /* now restore a proper %gs for the fault handler */ if (!wine_ldt_is_system(CS_sig(sigcontext)) || diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index d189bf7..760f849 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -67,6 +67,7 @@ struct wine_pthread_functions pthread_fu static inline NTSTATUS init_teb( TEB *teb ) { struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SystemReserved2; + struct ntdll_thread_regs *thread_regs = (struct ntdll_thread_regs *)teb->SpareBytes1; teb->Tib.ExceptionList = (void *)~0UL; teb->Tib.StackBase = (void *)~0UL; @@ -75,7 +76,7 @@ static inline NTSTATUS init_teb( TEB *te teb->StaticUnicodeString.Buffer = teb->StaticUnicodeBuffer; teb->StaticUnicodeString.MaximumLength = sizeof(teb->StaticUnicodeBuffer); - if (!(thread_data->teb_sel = wine_ldt_alloc_fs())) return STATUS_TOO_MANY_THREADS; + if (!(thread_regs->fs = wine_ldt_alloc_fs())) return STATUS_TOO_MANY_THREADS; thread_data->request_fd = -1; thread_data->reply_fd = -1; thread_data->wait_fd[0] = -1; @@ -92,10 +93,10 @@ static inline void free_teb( TEB *teb ) { SIZE_T size = 0; void *addr = teb; - struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SystemReserved2; + struct ntdll_thread_regs *thread_regs = (struct ntdll_thread_regs *)teb->SpareBytes1; NtFreeVirtualMemory( NtCurrentProcess(), &addr, &size, MEM_RELEASE ); - wine_ldt_free_fs( thread_data->teb_sel ); + wine_ldt_free_fs( thread_regs->fs ); munmap( teb, sigstack_total_size ); } @@ -113,6 +114,7 @@ void thread_init(void) void *addr; SIZE_T info_size; struct ntdll_thread_data *thread_data; + struct ntdll_thread_regs *thread_regs; struct wine_pthread_thread_info thread_info; static struct debug_info debug_info; /* debug info for initial thread */ @@ -138,13 +140,14 @@ void thread_init(void) teb = addr; init_teb( teb ); thread_data = (struct ntdll_thread_data *)teb->SystemReserved2; + thread_regs = (struct ntdll_thread_regs *)teb->SpareBytes1; thread_data->debug_info = &debug_info; InsertHeadList( &tls_links, &teb->TlsLinks ); thread_info.stack_base = NULL; thread_info.stack_size = 0; thread_info.teb_base = teb; - thread_info.teb_sel = thread_data->teb_sel; + thread_info.teb_sel = thread_regs->fs; wine_pthread_get_functions( &pthread_functions, sizeof(pthread_functions) ); pthread_functions.init_current_teb( &thread_info ); pthread_functions.init_thread( &thread_info ); @@ -243,7 +246,8 @@ NTSTATUS WINAPI RtlCreateUserThread( HAN PRTL_THREAD_START_ROUTINE start, void *param, HANDLE *handle_ptr, CLIENT_ID *id ) { - struct ntdll_thread_data *thread_data = NULL; + struct ntdll_thread_data *thread_data; + struct ntdll_thread_regs *thread_regs = NULL; struct startup_info *info = NULL; void *addr; HANDLE handle = 0; @@ -294,14 +298,20 @@ NTSTATUS WINAPI RtlCreateUserThread( HAN teb->ClientId.UniqueProcess = (HANDLE)GetCurrentProcessId(); teb->ClientId.UniqueThread = (HANDLE)tid; - /* inherit registers from parent thread */ - memcpy( teb->SpareBytes1, ntdll_get_thread_regs(), sizeof(teb->SpareBytes1) ); - thread_data = (struct ntdll_thread_data *)teb->SystemReserved2; + thread_regs = (struct ntdll_thread_regs *)teb->SpareBytes1; thread_data->request_fd = request_pipe[1]; info->pthread_info.teb_base = teb; - info->pthread_info.teb_sel = thread_data->teb_sel; + info->pthread_info.teb_sel = thread_regs->fs; + + /* inherit debug registers from parent thread */ + thread_regs->dr0 = ntdll_get_thread_regs()->dr0; + thread_regs->dr1 = ntdll_get_thread_regs()->dr1; + thread_regs->dr2 = ntdll_get_thread_regs()->dr2; + thread_regs->dr3 = ntdll_get_thread_regs()->dr3; + thread_regs->dr6 = ntdll_get_thread_regs()->dr6; + thread_regs->dr7 = ntdll_get_thread_regs()->dr7; if (!stack_reserve || !stack_commit) { @@ -333,7 +343,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HAN return STATUS_SUCCESS; error: - if (thread_data) wine_ldt_free_fs( thread_data->teb_sel ); + if (thread_regs) wine_ldt_free_fs( thread_regs->fs ); if (addr) { SIZE_T size = 0;
1
0
0
0
Juan Lang : iphlpapi: Remove redundant comments and fix typos.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: 53e634bec6edbc7a893d07d8bf94b168e9bb092a URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=53e634bec6edbc7a893d07d…
Author: Juan Lang <juan_lang(a)yahoo.com> Date: Fri Jan 20 16:16:56 2006 +0100 iphlpapi: Remove redundant comments and fix typos. --- dlls/iphlpapi/ifenum.c | 2 +- dlls/iphlpapi/ifenum.h | 8 +++----- dlls/iphlpapi/iphlpapi_main.c | 18 ++++-------------- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c index 63a66af..e794d09 100644 --- a/dlls/iphlpapi/ifenum.c +++ b/dlls/iphlpapi/ifenum.c @@ -34,7 +34,7 @@ * FIXME: * - I don't support IPv6 addresses here, since SIOCGIFCONF can't return them * - * There are three implemened methods for determining the MAC address of an + * There are three implemented methods for determining the MAC address of an * interface: * - a specific IOCTL (Linux) * - looking in the ARP cache (at least Solaris) diff --git a/dlls/iphlpapi/ifenum.h b/dlls/iphlpapi/ifenum.h index c33eaf7..17d6b5e 100644 --- a/dlls/iphlpapi/ifenum.h +++ b/dlls/iphlpapi/ifenum.h @@ -15,11 +15,9 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * This module implements functions shared by DLLs that need to enumerate - * network interfaces and addresses. It's meant to hide some problematic - * defines like socket(), as well as provide only one file - * that needs to be ported to implement these functions on different platforms, - * since the Windows API provides multiple ways to get at this info. + * This module implements network interface and address enumeration. It's + * meant to hide some problematic defines like socket(), and make iphlpapi + * more portable. * * Like Windows, it uses a numeric index to identify an interface uniquely. * As implemented, an interface represents a UNIX network interface, virtual diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 8bc5fdb..1f09c2c 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -87,7 +87,6 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD WINAPI AddIPAddress(IPAddr Address, IPMask IpMask, DWORD IfIndex, PULONG NTEContext, PULONG NTEInstance) { FIXME(":stub\n"); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -399,7 +398,6 @@ DWORD WINAPI CreateProxyArpEntry(DWORD d { FIXME("(dwAddress 0x%08lx, dwMask 0x%08lx, dwIfIndex 0x%08lx): stub\n", dwAddress, dwMask, dwIfIndex); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -422,7 +420,6 @@ DWORD WINAPI CreateProxyArpEntry(DWORD d DWORD WINAPI DeleteIPAddress(ULONG NTEContext) { FIXME("(NTEContext %ld): stub\n", NTEContext); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -494,7 +491,6 @@ DWORD WINAPI DeleteProxyArpEntry(DWORD d { FIXME("(dwAddress 0x%08lx, dwMask 0x%08lx, dwIfIndex 0x%08lx): stub\n", dwAddress, dwMask, dwIfIndex); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -520,7 +516,7 @@ DWORD WINAPI EnableRouter(HANDLE * pHand FIXME("(pHandle %p, pOverlapped %p): stub\n", pHandle, pOverlapped); /* could echo "1" > /proc/net/sys/net/ipv4/ip_forward, not sure I want to could map EACCESS to ERROR_ACCESS_DENIED, I suppose - marking Win2K+ functions not supported */ + */ return ERROR_NOT_SUPPORTED; } @@ -543,8 +539,7 @@ DWORD WINAPI EnableRouter(HANDLE * pHand DWORD WINAPI FlushIpNetTable(DWORD dwIfIndex) { FIXME("(dwIfIndex 0x%08lx): stub\n", dwIfIndex); - /* this flushes the arp cache of the given index - marking Win2K+ functions not supported */ + /* this flushes the arp cache of the given index */ return ERROR_NOT_SUPPORTED; } @@ -568,7 +563,6 @@ DWORD WINAPI FlushIpNetTable(DWORD dwIfI DWORD WINAPI GetAdapterIndex(LPWSTR AdapterName, PULONG IfIndex) { FIXME("(AdapterName %p, IfIndex %p): stub\n", AdapterName, IfIndex); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -945,7 +939,7 @@ DWORD WINAPI GetIfTable(PMIB_IFTABLE pIf * Get a list of network interface adapters. * * PARAMS - * pIfTable [Out] buffer for intertace adapters + * pIfTable [Out] buffer for interface adapters * dwOutBufLen [Out] if buffer is too small, returns required size * * RETURNS @@ -1454,7 +1448,6 @@ DWORD WINAPI GetPerAdapterInfo(ULONG IfI { TRACE("(IfIndex %ld, pPerAdapterInfo %p, pOutBufLen %p)\n", IfIndex, pPerAdapterInfo, pOutBufLen); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -1806,7 +1799,6 @@ DWORD WINAPI IpRenewAddress(PIP_ADAPTER_ DWORD WINAPI NotifyAddrChange(PHANDLE Handle, LPOVERLAPPED overlapped) { FIXME("(Handle %p, overlapped %p): stub\n", Handle, overlapped); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -1830,7 +1822,6 @@ DWORD WINAPI NotifyAddrChange(PHANDLE Ha DWORD WINAPI NotifyRouteChange(PHANDLE Handle, LPOVERLAPPED overlapped) { FIXME("(Handle %p, overlapped %p): stub\n", Handle, overlapped); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -1857,7 +1848,6 @@ DWORD WINAPI SendARP(IPAddr DestIP, IPAd { FIXME("(DestIP 0x%08lx, SrcIP 0x%08lx, pMacAddr %p, PhyAddrLen %p): stub\n", DestIP, SrcIP, pMacAddr, PhyAddrLen); - /* marking Win2K+ functions not supported */ return ERROR_NOT_SUPPORTED; } @@ -2027,6 +2017,6 @@ DWORD WINAPI UnenableRouter(OVERLAPPED * lpdwEnableCount); /* could echo "0" > /proc/net/sys/net/ipv4/ip_forward, not sure I want to could map EACCESS to ERROR_ACCESS_DENIED, I suppose - marking Win2K+ functions not supported */ + */ return ERROR_NOT_SUPPORTED; }
1
0
0
0
Detlef Riekenberg : user/tests: Added \n to a few ok() calls.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: 191d62e7f9f5fc96dbf1260fc6fb19a3fcc5e0c2 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=191d62e7f9f5fc96dbf1260…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Jan 20 16:16:43 2006 +0100 user/tests: Added \n to a few ok() calls. --- dlls/user/tests/resource.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user/tests/resource.c b/dlls/user/tests/resource.c index c910253..13988d9 100644 --- a/dlls/user/tests/resource.c +++ b/dlls/user/tests/resource.c @@ -287,11 +287,11 @@ static void test_LoadImage(void) { HBITMAP bmp; bmp = LoadBitmapA(NULL, MAKEINTRESOURCE(OBM_CHECK)); - ok(bmp != NULL, "Could not load the OBM_CHECK bitmap"); + ok(bmp != NULL, "Could not load the OBM_CHECK bitmap\n"); if (bmp) DeleteObject(bmp); bmp = LoadBitmapA(NULL, "#32760"); /* Value of OBM_CHECK */ - ok(bmp != NULL, "Could not load the OBM_CHECK bitmap"); + ok(bmp != NULL, "Could not load the OBM_CHECK bitmap\n"); if (bmp) DeleteObject(bmp); }
1
0
0
0
Robert Shearman : ole: Verify that the proxy is being used in the correct thread.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: 1b7d346d1f46aa28b77524a9f752bd038b27a231 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1b7d346d1f46aa28b77524a…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jan 20 16:16:08 2006 +0100 ole: Verify that the proxy is being used in the correct thread. --- dlls/ole32/rpc.c | 39 ++++++++++++++++++++++++++++++++++----- dlls/ole32/tests/marshal.c | 4 +--- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 06c24d3..c45df68 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -98,6 +98,7 @@ typedef struct RpcChannelBuffer super; /* superclass */ RPC_BINDING_HANDLE bind; /* handle to the remote server */ + OXID oxid; /* apartment in which the channel is valid */ } ClientRpcChannelBuffer; struct dispatch_params @@ -206,6 +207,12 @@ static HRESULT WINAPI ClientRpcChannelBu return HRESULT_FROM_WIN32(status); } +static HRESULT WINAPI ServerRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER iface, RPCOLEMESSAGE *olemsg, ULONG *pstatus) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + /* this thread runs an outgoing RPC */ static DWORD WINAPI rpc_sendreceive_thread(LPVOID param) { @@ -219,9 +226,22 @@ static DWORD WINAPI rpc_sendreceive_thre return 0; } -static HRESULT WINAPI RpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER iface, RPCOLEMESSAGE *olemsg, ULONG *pstatus) +static inline HRESULT ClientRpcChannelBuffer_IsCorrectApartment(ClientRpcChannelBuffer *This, APARTMENT *apt) { - HRESULT hr = S_OK; + OXID oxid; + if (!apt) + return S_FALSE; + if (apartment_getoxid(apt, &oxid) != S_OK) + return S_FALSE; + if (This->oxid != oxid) + return S_FALSE; + return S_OK; +} + +static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER iface, RPCOLEMESSAGE *olemsg, ULONG *pstatus) +{ + ClientRpcChannelBuffer *This = (ClientRpcChannelBuffer *)iface; + HRESULT hr; RPC_MESSAGE *msg = (RPC_MESSAGE *)olemsg; RPC_STATUS status; DWORD index; @@ -232,9 +252,17 @@ static HRESULT WINAPI RpcChannelBuffer_S TRACE("(%p) iMethod=%ld\n", olemsg, olemsg->iMethod); + hr = ClientRpcChannelBuffer_IsCorrectApartment(This, COM_CurrentApt()); + if (hr != S_OK) + { + ERR("called from wrong apartment, should have been 0x%s\n", + wine_dbgstr_longlong(This->oxid)); + return RPC_E_WRONG_THREAD; + } + params = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*params)); if (!params) return E_OUTOFMEMORY; - + params->msg = olemsg; params->status = RPC_S_OK; params->hr = S_OK; @@ -369,7 +397,7 @@ static const IRpcChannelBufferVtbl Clien RpcChannelBuffer_AddRef, ClientRpcChannelBuffer_Release, ClientRpcChannelBuffer_GetBuffer, - RpcChannelBuffer_SendReceive, + ClientRpcChannelBuffer_SendReceive, ClientRpcChannelBuffer_FreeBuffer, RpcChannelBuffer_GetDestCtx, RpcChannelBuffer_IsConnected @@ -381,7 +409,7 @@ static const IRpcChannelBufferVtbl Serve RpcChannelBuffer_AddRef, ServerRpcChannelBuffer_Release, ServerRpcChannelBuffer_GetBuffer, - RpcChannelBuffer_SendReceive, + ServerRpcChannelBuffer_SendReceive, ServerRpcChannelBuffer_FreeBuffer, RpcChannelBuffer_GetDestCtx, RpcChannelBuffer_IsConnected @@ -440,6 +468,7 @@ HRESULT RPC_CreateClientChannel(const OX This->super.lpVtbl = &ClientRpcChannelBufferVtbl; This->super.refs = 1; This->bind = bind; + apartment_getoxid(COM_CurrentApt(), &This->oxid); *chan = (IRpcChannelBuffer*)This; diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index dc445e5..10c690c 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -1021,14 +1021,12 @@ static DWORD CALLBACK bad_thread_proc(LP IUnknown * proxy = NULL; pCoInitializeEx(NULL, COINIT_MULTITHREADED); - + hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); if (proxy) IUnknown_Release(proxy); - todo_wine { ok(hr == RPC_E_WRONG_THREAD, "COM should have failed with RPC_E_WRONG_THREAD on using proxy from wrong apartment, but instead returned 0x%08lx\n", hr); - } CoUninitialize();
1
0
0
0
Robert Shearman : rpc: Replace the hack that detected stubless proxies with the correct check.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: 8c55c6f053370bdcd002340556e1980d88363329 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=8c55c6f053370bdcd002340…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jan 20 16:15:25 2006 +0100 rpc: Replace the hack that detected stubless proxies with the correct check. Pass in the ProxyInfo and Index to StdProxy_Construct instead of just the three members of the structure that were previously needed. Fix the detection of stubless proxies. --- dlls/rpcrt4/cproxy.c | 18 ++++++++++-------- dlls/rpcrt4/cpsf.c | 4 +--- dlls/rpcrt4/cpsf.h | 5 ++--- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 89dca95..21f23f3 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -119,20 +119,21 @@ struct StublessThunk { int dummy; }; HRESULT WINAPI StdProxy_Construct(REFIID riid, LPUNKNOWN pUnkOuter, - PCInterfaceName name, - CInterfaceProxyVtbl *vtbl, - CInterfaceStubVtbl *svtbl, + const ProxyFileInfo *ProxyInfo, + int Index, LPPSFACTORYBUFFER pPSFactory, LPRPCPROXYBUFFER *ppProxy, LPVOID *ppvObj) { StdProxyImpl *This; const MIDL_STUBLESS_PROXY_INFO *stubless = NULL; + PCInterfaceName name = ProxyInfo->pNamesArray[Index]; + CInterfaceProxyVtbl *vtbl = ProxyInfo->pProxyVtblList[Index]; TRACE("(%p,%p,%p,%p,%p) %s\n", pUnkOuter, vtbl, pPSFactory, ppProxy, ppvObj, name); - /* I can't find any other way to detect stubless proxies than this hack */ - if (!IsEqualGUID(vtbl->header.piid, riid)) { + /* TableVersion = 2 means it is the stubless version of CInterfaceProxyVtbl */ + if (ProxyInfo->TableVersion > 1) { stubless = *(const void **)vtbl; vtbl = (CInterfaceProxyVtbl *)((const void **)vtbl + 1); TRACE("stubless=%p\n", stubless); @@ -150,11 +151,12 @@ HRESULT WINAPI StdProxy_Construct(REFIID if (!This) return E_OUTOFMEMORY; if (stubless) { - unsigned i, count = svtbl->header.DispatchTableCount; + CInterfaceStubVtbl *svtbl = ProxyInfo->pStubVtblList[Index]; + unsigned long i, count = svtbl->header.DispatchTableCount; /* Maybe the original vtbl is just modified directly to point at * ObjectStublessClientXXX thunks in real Windows, but I don't like it */ - TRACE("stubless thunks: count=%d\n", count); + TRACE("stubless thunks: count=%ld\n", count); This->thunks = HeapAlloc(GetProcessHeap(),0,sizeof(struct StublessThunk)*count); This->PVtbl = HeapAlloc(GetProcessHeap(),0,sizeof(LPVOID)*count); for (i=0; i<count; i++) { @@ -162,7 +164,7 @@ HRESULT WINAPI StdProxy_Construct(REFIID if (vtbl->Vtbl[i] == (LPVOID)-1) { PFORMAT_STRING fs = stubless->ProcFormatString + stubless->FormatStringOffset[i]; unsigned bytes = *(const WORD*)(fs+8) - STACK_ADJUST; - TRACE("method %d: stacksize=%d\n", i, bytes); + TRACE("method %ld: stacksize=%d\n", i, bytes); FILL_STUBLESS(thunk, i, bytes) This->PVtbl[i] = thunk; } diff --git a/dlls/rpcrt4/cpsf.c b/dlls/rpcrt4/cpsf.c index 3f0190c..78ac681 100644 --- a/dlls/rpcrt4/cpsf.c +++ b/dlls/rpcrt4/cpsf.c @@ -95,9 +95,7 @@ static HRESULT WINAPI CStdPSFactory_Crea debugstr_guid(riid),ppProxy,ppv); if (!FindProxyInfo(This->pProxyFileList,riid,&ProxyInfo,&Index)) return E_NOINTERFACE; - return StdProxy_Construct(riid, pUnkOuter, ProxyInfo->pNamesArray[Index], - ProxyInfo->pProxyVtblList[Index], - ProxyInfo->pStubVtblList[Index], iface, ppProxy, ppv); + return StdProxy_Construct(riid, pUnkOuter, ProxyInfo, Index, iface, ppProxy, ppv); } static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface, diff --git a/dlls/rpcrt4/cpsf.h b/dlls/rpcrt4/cpsf.h index 60364d3..0c6d067 100644 --- a/dlls/rpcrt4/cpsf.h +++ b/dlls/rpcrt4/cpsf.h @@ -23,9 +23,8 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid, LPUNKNOWN pUnkOuter, - PCInterfaceName name, - CInterfaceProxyVtbl *vtbl, - CInterfaceStubVtbl *svtbl, + const ProxyFileInfo *ProxyInfo, + int Index, LPPSFACTORYBUFFER pPSFactory, LPRPCPROXYBUFFER *ppProxy, LPVOID *ppvObj);
1
0
0
0
Robert Shearman : rpc: Skip over the right number of bytes in new correlation descriptors.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: 5b629e950949357bcc99fd84a7c2d593de36902c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=5b629e950949357bcc99fd8…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jan 20 16:15:11 2006 +0100 rpc: Skip over the right number of bytes in new correlation descriptors. Skip over 6 bytes of the format descriptor if new correlation descriptors are being used, instead of 4. --- dlls/rpcrt4/ndr_marshall.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 6a681a7..3045b42 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -310,7 +310,10 @@ PFORMAT_STRING ReadConformance(MIDL_STUB pStubMsg->MaxCount = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer); pStubMsg->Buffer += 4; TRACE("unmarshalled conformance is %ld\n", pStubMsg->MaxCount); - return pFormat+4; + if (pStubMsg->fHasNewCorrDesc) + return pFormat+6; + else + return pFormat+4; } static inline PFORMAT_STRING ReadVariance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat) @@ -330,7 +333,10 @@ static inline PFORMAT_STRING ReadVarianc TRACE("variance is %ld\n", pStubMsg->ActualCount); done: - return pFormat+4; + if (pStubMsg->fHasNewCorrDesc) + return pFormat+6; + else + return pFormat+4; } PFORMAT_STRING ComputeConformanceOrVariance( @@ -444,7 +450,10 @@ done_conf_grab: finish_conf: TRACE("resulting conformance is %ld\n", *pCount); - return pFormat+4; + if (pStubMsg->fHasNewCorrDesc) + return pFormat+6; + else + return pFormat+4; }
1
0
0
0
Robert Shearman : ole: Add a test for WM_QUIT behaviour during COM calls.
by Alexandre Julliard
20 Jan '06
20 Jan '06
Module: wine Branch: refs/heads/master Commit: 98734cc89410637a012568713e599169f8b288d7 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=98734cc89410637a0125687…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jan 20 16:14:32 2006 +0100 ole: Add a test for WM_QUIT behaviour during COM calls. --- dlls/ole32/tests/marshal.c | 94 +++++++++++++++++++++++++++++++++++++------- 1 files changed, 79 insertions(+), 15 deletions(-) diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index a9eec4c..dc445e5 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -37,16 +37,18 @@ HRESULT (WINAPI * pCoInitializeEx)(LPVOI #define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %ld\n", cLocks) #define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08lx\n", hr) +static const IID IID_IWineTest = +{ + 0x5201163f, + 0x8164, + 0x4fd0, + {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} +}; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */ + static void test_CoGetPSClsid(void) { HRESULT hr; CLSID clsid; - static const CLSID IID_IWineTest = { - 0x5201163f, - 0x8164, - 0x4fd0, - {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} - }; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */ hr = CoGetPSClsid(&IID_IClassFactory, &clsid); ok_ole_success(hr, CoGetPSClsid); @@ -277,12 +279,6 @@ static void test_no_marshaler(void) { IStream *pStream; HRESULT hr; - static const CLSID IID_IWineTest = { - 0x5201163f, - 0x8164, - 0x4fd0, - {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} - }; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */ hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); ok_ole_success(hr, CreateStreamOnHGlobal); @@ -1401,8 +1397,11 @@ static HRESULT WINAPI TestRE_IClassFacto LPVOID *ppvObj) { DWORD_PTR res; - BOOL ret = SendMessageTimeout(hwnd_app, WM_NULL, 0, 0, SMTO_BLOCK, 5000, &res); - ok(ret, "Timed out sending a message to originating window during RPC call\n"); + if (IsEqualIID(riid, &IID_IWineTest)) + { + BOOL ret = SendMessageTimeout(hwnd_app, WM_NULL, 0, 0, SMTO_BLOCK, 5000, &res); + ok(ret, "Timed out sending a message to originating window during RPC call\n"); + } return S_FALSE; } @@ -1445,7 +1444,9 @@ static LRESULT CALLBACK window_proc(HWND ok_more_than_one_lock(); - hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object); + /* note the use of the magic IID_IWineTest value to tell remote thread + * to try to send a message back to us */ + hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IWineTest, (void **)&object); IClassFactory_Release(proxy); @@ -1457,6 +1458,43 @@ static LRESULT CALLBACK window_proc(HWND return 0; } + case WM_USER+1: + { + HRESULT hr; + IStream *pStream = NULL; + IClassFactory *proxy = NULL; + IUnknown *object; + DWORD tid; + HANDLE thread; + + cLocks = 0; + + hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); + ok_ole_success(hr, CreateStreamOnHGlobal); + tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&TestRE_ClassFactory, MSHLFLAGS_NORMAL, &thread); + + ok_more_than_one_lock(); + + IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); + hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&proxy); + ok_ole_success(hr, CoReleaseMarshalData); + IStream_Release(pStream); + + ok_more_than_one_lock(); + + /* post quit message before a doing a COM call to show that a pending + * WM_QUIT message doesn't stop the call from succeeding */ + PostMessage(hwnd, WM_QUIT, 0, 0); + hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object); + + IClassFactory_Release(proxy); + + ok_no_locks(); + + end_host_object(tid, thread); + + return 0; + } default: return DefWindowProc(hwnd, msg, wparam, lparam); } @@ -1475,6 +1513,7 @@ static void test_message_reentrancy(void hwnd_app = CreateWindow("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0); ok(hwnd_app != NULL, "Window creation failed\n"); + /* start message re-entrancy test */ PostMessage(hwnd_app, WM_USER, 0, 0); while (GetMessage(&msg, NULL, 0, 0)) @@ -1484,6 +1523,23 @@ static void test_message_reentrancy(void } } +static void test_WM_QUIT_handling(void) +{ + MSG msg; + + hwnd_app = CreateWindow("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0); + ok(hwnd_app != NULL, "Window creation failed\n"); + + /* start WM_QUIT handling test */ + PostMessage(hwnd_app, WM_USER+1, 0, 0); + + while (GetMessage(&msg, NULL, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } +} + /* doesn't pass with Win9x COM DLLs (even though Essential COM says it should) */ #if 0 @@ -1852,9 +1908,16 @@ static void test_marshal_HENHMETAFILE(vo START_TEST(marshal) { + WNDCLASS wndclass; HMODULE hOle32 = GetModuleHandle("ole32"); if (!(pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx"))) goto no_test; + /* register a window class used in several tests */ + memset(&wndclass, 0, sizeof(wndclass)); + wndclass.lpfnWndProc = window_proc; + wndclass.lpszClassName = "WineCOMTest"; + RegisterClass(&wndclass); + pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); /* FIXME: test CoCreateInstanceEx */ @@ -1889,6 +1952,7 @@ START_TEST(marshal) test_stubbuffer(&IID_IClassFactory); test_proxybuffer(&IID_IClassFactory); test_message_reentrancy(); + test_WM_QUIT_handling(); /* test_out_of_process_com(); */
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
62
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
Results per page:
10
25
50
100
200