winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2009
----- 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
3 participants
1233 discussions
Start a n
N
ew thread
Alexandre Julliard : user32: Make WINPROC_AllocProc take a unicode flag for consistency with the other winproc functions .
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: 77ab4354025cd5477c4f91a299deff5ff70bf8d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77ab4354025cd5477c4f91a29…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 18 12:41:59 2009 +0100 user32: Make WINPROC_AllocProc take a unicode flag for consistency with the other winproc functions. --- dlls/user32/class.c | 7 +++---- dlls/user32/controls.h | 2 +- dlls/user32/message.c | 4 ++-- dlls/user32/msg16.c | 5 +---- dlls/user32/user_private.h | 2 +- dlls/user32/win.c | 6 ++---- dlls/user32/winproc.c | 34 ++++++++++++++++------------------ 7 files changed, 26 insertions(+), 34 deletions(-) diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 040f3c1..f7e0f25 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -551,7 +551,7 @@ ATOM WINAPI RegisterClassExA( const WNDCLASSEXA* wc ) classPtr->hIconSm = wc->hIconSm; classPtr->hCursor = wc->hCursor; classPtr->hbrBackground = wc->hbrBackground; - classPtr->winproc = WINPROC_AllocProc( wc->lpfnWndProc, NULL ); + classPtr->winproc = WINPROC_AllocProc( wc->lpfnWndProc, FALSE ); CLASS_SetMenuNameA( classPtr, wc->lpszMenuName ); release_class_ptr( classPtr ); return atom; @@ -589,7 +589,7 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc ) classPtr->hIconSm = wc->hIconSm; classPtr->hCursor = wc->hCursor; classPtr->hbrBackground = wc->hbrBackground; - classPtr->winproc = WINPROC_AllocProc( NULL, wc->lpfnWndProc ); + classPtr->winproc = WINPROC_AllocProc( wc->lpfnWndProc, TRUE ); CLASS_SetMenuNameW( classPtr, wc->lpszMenuName ); release_class_ptr( classPtr ); return atom; @@ -903,8 +903,7 @@ static ULONG_PTR CLASS_SetClassLong( HWND hwnd, INT offset, LONG_PTR newval, break; case GCLP_WNDPROC: retval = (ULONG_PTR)WINPROC_GetProc( class->winproc, unicode ); - class->winproc = WINPROC_AllocProc( unicode ? NULL : (WNDPROC)newval, - unicode ? (WNDPROC)newval : NULL ); + class->winproc = WINPROC_AllocProc( (WNDPROC)newval, unicode ); break; case GCLP_HBRBACKGROUND: retval = (ULONG_PTR)class->hbrBackground; diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index f9a17e8..3bde456 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -110,7 +110,7 @@ struct wow_handlers32 LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT); - WNDPROC (*alloc_winproc)(WNDPROC,WNDPROC); + WNDPROC (*alloc_winproc)(WNDPROC,BOOL); }; extern struct wow_handlers16 wow_handlers DECLSPEC_HIDDEN; diff --git a/dlls/user32/message.c b/dlls/user32/message.c index ffe7f76..d6fd5af 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -3589,7 +3589,7 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc ) UINT_PTR ret; WNDPROC winproc = 0; - if (proc) winproc = WINPROC_AllocProc( (WNDPROC)proc, NULL ); + if (proc) winproc = WINPROC_AllocProc( (WNDPROC)proc, FALSE ); SERVER_START_REQ( set_win_timer ) { @@ -3620,7 +3620,7 @@ UINT_PTR WINAPI SetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC UINT_PTR ret; WNDPROC winproc = 0; - if (proc) winproc = WINPROC_AllocProc( (WNDPROC)proc, NULL ); + if (proc) winproc = WINPROC_AllocProc( (WNDPROC)proc, FALSE ); SERVER_START_REQ( set_win_timer ) { diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index 0e57988..c3365e8 100644 --- a/dlls/user32/msg16.c +++ b/dlls/user32/msg16.c @@ -231,10 +231,7 @@ done: */ WNDPROC16 WINPROC_GetProc16( WNDPROC proc, BOOL unicode ) { - WNDPROC winproc; - - if (unicode) winproc = wow_handlers32.alloc_winproc( NULL, proc ); - else winproc = wow_handlers32.alloc_winproc( proc, NULL ); + WNDPROC winproc = wow_handlers32.alloc_winproc( proc, unicode ); if ((ULONG_PTR)winproc >> 16 != WINPROC_HANDLE) return (WNDPROC16)winproc; return alloc_win16_thunk( winproc ); diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index e5db691..fc92f25 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -239,7 +239,7 @@ typedef LRESULT (*winproc_callback16_t)( HWND16 hwnd, UINT16 msg, WPARAM16 wp, L extern WNDPROC16 WINPROC_GetProc16( WNDPROC proc, BOOL unicode ) DECLSPEC_HIDDEN; extern WNDPROC WINPROC_AllocProc16( WNDPROC16 func ) DECLSPEC_HIDDEN; extern WNDPROC WINPROC_GetProc( WNDPROC proc, BOOL unicode ) DECLSPEC_HIDDEN; -extern WNDPROC WINPROC_AllocProc( WNDPROC funcA, WNDPROC funcW ) DECLSPEC_HIDDEN; +extern WNDPROC WINPROC_AllocProc( WNDPROC func, BOOL unicode ) DECLSPEC_HIDDEN; extern BOOL WINPROC_IsUnicode( WNDPROC proc, BOOL def_val ) DECLSPEC_HIDDEN; extern LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg, diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 9712beb..7834501 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2099,8 +2099,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B WNDPROC proc; UINT old_flags = wndPtr->flags; retval = WIN_GetWindowLong( hwnd, offset, size, unicode ); - if (unicode) proc = WINPROC_AllocProc( NULL, (WNDPROC)newval ); - else proc = WINPROC_AllocProc( (WNDPROC)newval, NULL ); + proc = WINPROC_AllocProc( (WNDPROC)newval, unicode ); if (proc) wndPtr->winproc = proc; if (WINPROC_IsUnicode( proc, unicode )) wndPtr->flags |= WIN_ISUNICODE; else wndPtr->flags &= ~WIN_ISUNICODE; @@ -2122,8 +2121,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B { WNDPROC *ptr = (WNDPROC *)((char *)wndPtr->wExtra + DWLP_DLGPROC); retval = (ULONG_PTR)WINPROC_GetProc( *ptr, unicode ); - if (unicode) *ptr = WINPROC_AllocProc( NULL, (WNDPROC)newval ); - else *ptr = WINPROC_AllocProc( (WNDPROC)newval, NULL ); + *ptr = WINPROC_AllocProc( (WNDPROC)newval, unicode ); WIN_ReleasePtr( wndPtr ); return retval; } diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 7bdb91d..36f8279 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -104,21 +104,20 @@ static inline void free_buffer( void *static_buffer, void *buffer ) /* find an existing winproc for a given function and type */ /* FIXME: probably should do something more clever than a linear search */ -static inline WINDOWPROC *find_winproc( WNDPROC funcA, WNDPROC funcW ) +static inline WINDOWPROC *find_winproc( WNDPROC func, BOOL unicode ) { unsigned int i; for (i = 0; i < NB_BUILTIN_AW_WINPROCS; i++) { /* match either proc, some apps confuse A and W */ - if (funcA && winproc_array[i].procA != funcA && winproc_array[i].procW != funcA) continue; - if (funcW && winproc_array[i].procA != funcW && winproc_array[i].procW != funcW) continue; + if (winproc_array[i].procA != func && winproc_array[i].procW != func) continue; return &winproc_array[i]; } for (i = NB_BUILTIN_AW_WINPROCS; i < winproc_used; i++) { - if (funcA && winproc_array[i].procA != funcA) continue; - if (funcW && winproc_array[i].procW != funcW) continue; + if (!unicode && winproc_array[i].procA != func) continue; + if (unicode && winproc_array[i].procW != func) continue; return &winproc_array[i]; } return NULL; @@ -142,32 +141,31 @@ static inline WNDPROC proc_to_handle( WINDOWPROC *proc ) } /* allocate and initialize a new winproc */ -static inline WINDOWPROC *alloc_winproc( WNDPROC funcA, WNDPROC funcW ) +static inline WINDOWPROC *alloc_winproc( WNDPROC func, BOOL unicode ) { WINDOWPROC *proc; /* check if the function is already a win proc */ - if (funcA && (proc = handle_to_proc( funcA ))) return proc; - if (funcW && (proc = handle_to_proc( funcW ))) return proc; - if (!funcA && !funcW) return NULL; + if (!func) return NULL; + if ((proc = handle_to_proc( func ))) return proc; EnterCriticalSection( &winproc_cs ); /* check if we already have a winproc for that function */ - if (!(proc = find_winproc( funcA, funcW ))) + if (!(proc = find_winproc( func, unicode ))) { if (winproc_used < MAX_WINPROCS) { proc = &winproc_array[winproc_used++]; - proc->procA = funcA; - proc->procW = funcW; + if (unicode) proc->procW = func; + else proc->procA = func; TRACE( "allocated %p for %c %p (%d/%d used)\n", - proc_to_handle(proc), funcA ? 'A' : 'W', funcA ? funcA : funcW, + proc_to_handle(proc), unicode ? 'W' : 'A', func, winproc_used, MAX_WINPROCS ); } - else FIXME( "too many winprocs, cannot allocate one for %p/%p\n", funcA, funcW ); + else FIXME( "too many winprocs, cannot allocate one for %p\n", func ); } - else TRACE( "reusing %p for %p/%p\n", proc_to_handle(proc), funcA, funcW ); + else TRACE( "reusing %p for %p\n", proc_to_handle(proc), func ); LeaveCriticalSection( &winproc_cs ); return proc; @@ -304,12 +302,12 @@ WNDPROC WINPROC_GetProc( WNDPROC proc, BOOL unicode ) * lot of windows, it will usually only have a limited number of window procedures, so the * array won't grow too large, and this way we avoid the need to track allocations per window. */ -WNDPROC WINPROC_AllocProc( WNDPROC funcA, WNDPROC funcW ) +WNDPROC WINPROC_AllocProc( WNDPROC func, BOOL unicode ) { WINDOWPROC *proc; - if (!(proc = alloc_winproc( funcA, funcW ))) return NULL; - if (proc == WINPROC_PROC16) return funcA ? funcA : funcW; + if (!(proc = alloc_winproc( func, unicode ))) return NULL; + if (proc == WINPROC_PROC16) return func; return proc_to_handle( proc ); }
1
0
0
0
Alexandre Julliard : user32: Simplify window procedure allocation for the builtin classes.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: d081a7352c53b108da744370dc15b412957f28e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d081a7352c53b108da744370d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 18 12:39:13 2009 +0100 user32: Simplify window procedure allocation for the builtin classes. --- dlls/user32/button.c | 3 +-- dlls/user32/class.c | 2 +- dlls/user32/combo.c | 3 +-- dlls/user32/controls.h | 3 +-- dlls/user32/desktop.c | 3 +-- dlls/user32/dialog.c | 3 +-- dlls/user32/edit.c | 3 +-- dlls/user32/icontitle.c | 3 +-- dlls/user32/listbox.c | 6 ++---- dlls/user32/mdi.c | 3 +-- dlls/user32/menu.c | 3 +-- dlls/user32/message.c | 3 +-- dlls/user32/scroll.c | 3 +-- dlls/user32/static.c | 3 +-- 14 files changed, 15 insertions(+), 29 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index 6e68785..cec92e0 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -162,8 +162,7 @@ const struct builtin_class_descr BUTTON_builtin_class = { buttonW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_BUTTON), /* procW */ + WINPROC_BUTTON, /* proc */ NB_EXTRA_BYTES, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/class.c b/dlls/user32/class.c index e8ca0e5..040f3c1 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -400,7 +400,7 @@ static void register_builtin( const struct builtin_class_descr *descr ) classPtr->hCursor = LoadCursorA( 0, (LPSTR)descr->cursor ); classPtr->hbrBackground = descr->brush; - classPtr->winproc = WINPROC_AllocProc( descr->procA, descr->procW ); + classPtr->winproc = BUILTIN_WINPROC( descr->proc ); release_class_ptr( classPtr ); } diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 948c6a7..1dd4f37 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -94,8 +94,7 @@ const struct builtin_class_descr COMBO_builtin_class = { comboboxW, /* name */ CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_COMBO), /* procW */ + WINPROC_COMBO, /* proc */ sizeof(HEADCOMBO *), /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index ba455ba..f9a17e8 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -60,8 +60,7 @@ struct builtin_class_descr { LPCWSTR name; /* class name */ UINT style; /* class style */ - WNDPROC procA; /* ASCII window procedure */ - WNDPROC procW; /* Unicode window procedure */ + enum builtin_winprocs proc; INT extra; /* window extra bytes */ ULONG_PTR cursor; /* cursor id */ HBRUSH brush; /* brush or system color */ diff --git a/dlls/user32/desktop.c b/dlls/user32/desktop.c index e29d72c..df4ac70 100644 --- a/dlls/user32/desktop.c +++ b/dlls/user32/desktop.c @@ -46,8 +46,7 @@ const struct builtin_class_descr DESKTOP_builtin_class = { (LPCWSTR)DESKTOP_CLASS_ATOM, /* name */ CS_DBLCLKS, /* style */ - NULL, /* procA (winproc is Unicode only) */ - BUILTIN_WINPROC(WINPROC_DESKTOP), /* procW */ + WINPROC_DESKTOP, /* proc */ 0, /* extra */ IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_BACKGROUND+1) /* brush */ diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index 1309c09..a7040ea 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -97,8 +97,7 @@ const struct builtin_class_descr DIALOG_builtin_class = { (LPCWSTR)DIALOG_CLASS_ATOM, /* name */ CS_SAVEBITS | CS_DBLCLKS, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_DIALOG), /* procW */ + WINPROC_DIALOG, /* proc */ DLGWINDOWEXTRA, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 3466002..4e86ede 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -4978,8 +4978,7 @@ const struct builtin_class_descr EDIT_builtin_class = { editW, /* name */ CS_DBLCLKS | CS_PARENTDC, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_EDIT), /* procW */ + WINPROC_EDIT, /* proc */ #ifdef __i386__ sizeof(EDITSTATE *) + sizeof(HLOCAL16), /* extra */ #else diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c index b6f2c08..04f0c69 100644 --- a/dlls/user32/icontitle.c +++ b/dlls/user32/icontitle.c @@ -45,8 +45,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class = { (LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */ 0, /* style */ - NULL, /* procA (winproc is Unicode only) */ - BUILTIN_WINPROC(WINPROC_ICONTITLE), /* procW */ + WINPROC_ICONTITLE, /* proc */ 0, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 4bc9664..03b894a 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -138,8 +138,7 @@ const struct builtin_class_descr LISTBOX_builtin_class = { listboxW, /* name */ CS_DBLCLKS /*| CS_PARENTDC*/, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_LISTBOX), /* procW */ + WINPROC_LISTBOX, /* proc */ sizeof(LB_DESCR *), /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ @@ -154,8 +153,7 @@ const struct builtin_class_descr COMBOLBOX_builtin_class = { combolboxW, /* name */ CS_DBLCLKS | CS_SAVEBITS, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_LISTBOX), /* procW */ + WINPROC_LISTBOX, /* proc */ sizeof(LB_DESCR *), /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index fcfbd27..991ba37 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -186,8 +186,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class = { mdiclientW, /* name */ 0, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_MDICLIENT), /* procW */ + WINPROC_MDICLIENT, /* proc */ sizeof(MDICLIENTINFO), /* extra */ IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */ diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 4e03651..9205146 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -194,8 +194,7 @@ const struct builtin_class_descr MENU_builtin_class = { (LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */ CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */ - NULL, /* procA (winproc is Unicode only) */ - BUILTIN_WINPROC(WINPROC_MENU), /* procW */ + WINPROC_MENU, /* proc */ sizeof(HMENU), /* extra */ IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_MENU+1) /* brush */ diff --git a/dlls/user32/message.c b/dlls/user32/message.c index b544a76..ffe7f76 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -96,8 +96,7 @@ const struct builtin_class_descr MESSAGE_builtin_class = { messageW, /* name */ 0, /* style */ - NULL, /* procA (winproc is Unicode only) */ - BUILTIN_WINPROC(WINPROC_MESSAGE), /* procW */ + WINPROC_MESSAGE, /* proc */ 0, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 13b5eaf..6c34652 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -124,8 +124,7 @@ const struct builtin_class_descr SCROLL_builtin_class = { scrollbarW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_SCROLLBAR), /* procW */ + WINPROC_SCROLLBAR, /* proc */ sizeof(SCROLLBAR_INFO), /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/static.c b/dlls/user32/static.c index 0f778bb..2ed3b75 100644 --- a/dlls/user32/static.c +++ b/dlls/user32/static.c @@ -102,8 +102,7 @@ const struct builtin_class_descr STATIC_builtin_class = { staticW, /* name */ CS_DBLCLKS | CS_PARENTDC, /* style */ - NULL, /* procA */ - BUILTIN_WINPROC(WINPROC_STATIC), /* procW */ + WINPROC_STATIC, /* proc */ STATIC_EXTRA_BYTES, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */
1
0
0
0
Alexandre Julliard : user32: Pre-allocate the window procedure for the message class.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: 6b0cdc192272094cf0ff783aef9176ba090bded6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b0cdc192272094cf0ff783ae…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 18 12:38:22 2009 +0100 user32: Pre-allocate the window procedure for the message class. --- dlls/user32/controls.h | 2 ++ dlls/user32/message.c | 8 ++++---- dlls/user32/winproc.c | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 6925f33..ba455ba 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -47,6 +47,7 @@ enum builtin_winprocs WINPROC_DESKTOP, WINPROC_ICONTITLE, WINPROC_MENU, + WINPROC_MESSAGE, NB_BUILTIN_WINPROCS, NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP }; @@ -83,6 +84,7 @@ extern const struct builtin_class_descr STATIC_builtin_class DECLSPEC_HIDDEN; extern LRESULT WINAPI DesktopWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; extern LRESULT WINAPI IconTitleWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; extern LRESULT WINAPI PopupMenuWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; +extern LRESULT WINAPI MessageWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; /* Wow handlers */ diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 285a24c..b544a76 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -91,13 +91,13 @@ struct send_message_info /* Message class descriptor */ static const WCHAR messageW[] = {'M','e','s','s','a','g','e',0}; -static LRESULT WINAPI message_winproc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ); + const struct builtin_class_descr MESSAGE_builtin_class = { messageW, /* name */ 0, /* style */ NULL, /* procA (winproc is Unicode only) */ - message_winproc, /* procW */ + BUILTIN_WINPROC(WINPROC_MESSAGE), /* procW */ 0, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ @@ -333,11 +333,11 @@ static inline BOOL get_pending_wmchar( MSG *msg, UINT first, UINT last, BOOL rem /*********************************************************************** - * message_winproc + * MessageWndProc * * Window procedure for "Message" windows (HWND_MESSAGE parent). */ -static LRESULT WINAPI message_winproc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) +LRESULT WINAPI MessageWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { if (message == WM_NCCREATE) return TRUE; return 0; /* all other messages are ignored */ diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 15920a1..7bdb91d 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -77,6 +77,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] = { NULL, DesktopWndProc }, /* WINPROC_DESKTOP */ { NULL, IconTitleWndProc }, /* WINPROC_ICONTITLE */ { NULL, PopupMenuWndProc }, /* WINPROC_MENU */ + { NULL, MessageWndProc }, /* WINPROC_MESSAGE */ }; static UINT winproc_used = NB_BUILTIN_WINPROCS;
1
0
0
0
Alexandre Julliard : user32: Pre-allocate the window procedure for the menu class.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: e6f15c5886d734e965cd3f272e35de0081fd4401 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6f15c5886d734e965cd3f272…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 18 12:37:58 2009 +0100 user32: Pre-allocate the window procedure for the menu class. --- dlls/user32/controls.h | 2 ++ dlls/user32/menu.c | 6 ++---- dlls/user32/winproc.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 726ca72..6925f33 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -46,6 +46,7 @@ enum builtin_winprocs /* unicode-only procs */ WINPROC_DESKTOP, WINPROC_ICONTITLE, + WINPROC_MENU, NB_BUILTIN_WINPROCS, NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP }; @@ -81,6 +82,7 @@ extern const struct builtin_class_descr STATIC_builtin_class DECLSPEC_HIDDEN; extern LRESULT WINAPI DesktopWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; extern LRESULT WINAPI IconTitleWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; +extern LRESULT WINAPI PopupMenuWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; /* Wow handlers */ diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 2f0ffc2..4e03651 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -183,8 +183,6 @@ static HMENU top_popup_hmenu; /* Flag set by EndMenu() to force an exit from menu tracking */ static BOOL fEndMenu = FALSE; -static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ); - DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFONT hFont); static BOOL SetMenuItemInfo_common( MENUITEM *, const MENUITEMINFOW *, BOOL); @@ -197,7 +195,7 @@ const struct builtin_class_descr MENU_builtin_class = (LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */ CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */ NULL, /* procA (winproc is Unicode only) */ - PopupMenuWndProc, /* procW */ + BUILTIN_WINPROC(WINPROC_MENU), /* procW */ sizeof(HMENU), /* extra */ IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_MENU+1) /* brush */ @@ -3442,7 +3440,7 @@ BOOL WINAPI TrackPopupMenu( HMENU hMenu, UINT wFlags, INT x, INT y, * * NOTE: Windows has totally different (and undocumented) popup wndproc. */ -static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) +LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { TRACE("hwnd=%p msg=0x%04x wp=0x%04lx lp=0x%08lx\n", hwnd, message, wParam, lParam); diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 0f9b6f2..15920a1 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -76,6 +76,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] = { StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */ { NULL, DesktopWndProc }, /* WINPROC_DESKTOP */ { NULL, IconTitleWndProc }, /* WINPROC_ICONTITLE */ + { NULL, PopupMenuWndProc }, /* WINPROC_MENU */ }; static UINT winproc_used = NB_BUILTIN_WINPROCS;
1
0
0
0
Alexandre Julliard : user32: Pre-allocate the window procedure for the icon title class.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: d88c34099b16540c1f122d5e97ad7529a1883176 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d88c34099b16540c1f122d5e9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 18 12:37:05 2009 +0100 user32: Pre-allocate the window procedure for the icon title class. --- dlls/user32/controls.h | 2 ++ dlls/user32/icontitle.c | 4 +--- dlls/user32/winproc.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 16ebe6d..726ca72 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -45,6 +45,7 @@ enum builtin_winprocs WINPROC_STATIC, /* unicode-only procs */ WINPROC_DESKTOP, + WINPROC_ICONTITLE, NB_BUILTIN_WINPROCS, NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP }; @@ -79,6 +80,7 @@ extern const struct builtin_class_descr SCROLL_builtin_class DECLSPEC_HIDDEN; extern const struct builtin_class_descr STATIC_builtin_class DECLSPEC_HIDDEN; extern LRESULT WINAPI DesktopWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; +extern LRESULT WINAPI IconTitleWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; /* Wow handlers */ diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c index aa8ebc5..b6f2c08 100644 --- a/dlls/user32/icontitle.c +++ b/dlls/user32/icontitle.c @@ -38,8 +38,6 @@ static BOOL bMultiLineTitle; static HFONT hIconTitleFont; -static LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); - /********************************************************************* * icon title class descriptor */ @@ -48,7 +46,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class = (LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */ 0, /* style */ NULL, /* procA (winproc is Unicode only) */ - IconTitleWndProc, /* procW */ + BUILTIN_WINPROC(WINPROC_ICONTITLE), /* procW */ 0, /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index a5cbf32..0f9b6f2 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -75,6 +75,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] = { ScrollBarWndProcA, ScrollBarWndProcW }, /* WINPROC_SCROLLBAR */ { StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */ { NULL, DesktopWndProc }, /* WINPROC_DESKTOP */ + { NULL, IconTitleWndProc }, /* WINPROC_ICONTITLE */ }; static UINT winproc_used = NB_BUILTIN_WINPROCS;
1
0
0
0
Alexandre Julliard : user32: Pre-allocate the window procedure for the desktop class.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: 0c4e151ee9b8a27d86857e51eeac47c5544c6581 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c4e151ee9b8a27d86857e51e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 18 12:36:26 2009 +0100 user32: Pre-allocate the window procedure for the desktop class. --- dlls/user32/controls.h | 8 +++++++- dlls/user32/desktop.c | 6 ++---- dlls/user32/winproc.c | 5 +++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index e7aa408..16ebe6d 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -33,6 +33,7 @@ enum builtin_winprocs { + /* dual A/W procs */ WINPROC_BUTTON = 0, WINPROC_COMBO, WINPROC_DEFWND, @@ -42,7 +43,10 @@ enum builtin_winprocs WINPROC_MDICLIENT, WINPROC_SCROLLBAR, WINPROC_STATIC, - NB_BUILTIN_WINPROCS + /* unicode-only procs */ + WINPROC_DESKTOP, + NB_BUILTIN_WINPROCS, + NB_BUILTIN_AW_WINPROCS = WINPROC_DESKTOP }; #define WINPROC_HANDLE (~0u >> 16) @@ -74,6 +78,8 @@ extern const struct builtin_class_descr MESSAGE_builtin_class DECLSPEC_HIDDEN; extern const struct builtin_class_descr SCROLL_builtin_class DECLSPEC_HIDDEN; extern const struct builtin_class_descr STATIC_builtin_class DECLSPEC_HIDDEN; +extern LRESULT WINAPI DesktopWndProc(HWND,UINT,WPARAM,LPARAM) DECLSPEC_HIDDEN; + /* Wow handlers */ struct wow_handlers16 diff --git a/dlls/user32/desktop.c b/dlls/user32/desktop.c index a060aad..e29d72c 100644 --- a/dlls/user32/desktop.c +++ b/dlls/user32/desktop.c @@ -38,8 +38,6 @@ static HBITMAP hbitmapWallPaper; static SIZE bitmapSize; static BOOL fTileWallPaper; -static LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ); - /********************************************************************* * desktop class descriptor @@ -49,7 +47,7 @@ const struct builtin_class_descr DESKTOP_builtin_class = (LPCWSTR)DESKTOP_CLASS_ATOM, /* name */ CS_DBLCLKS, /* style */ NULL, /* procA (winproc is Unicode only) */ - DesktopWndProc, /* procW */ + BUILTIN_WINPROC(WINPROC_DESKTOP), /* procW */ 0, /* extra */ IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_BACKGROUND+1) /* brush */ @@ -115,7 +113,7 @@ static HBITMAP DESKTOP_LoadBitmap( HDC hdc, const char *filename ) /*********************************************************************** * DesktopWndProc */ -static LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) +LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { if (message == WM_NCCREATE) return TRUE; return 0; /* all other messages are ignored */ diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index bd30b49..a5cbf32 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -74,6 +74,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] = { MDIClientWndProcA, MDIClientWndProcW }, /* WINPROC_MDICLIENT */ { ScrollBarWndProcA, ScrollBarWndProcW }, /* WINPROC_SCROLLBAR */ { StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */ + { NULL, DesktopWndProc }, /* WINPROC_DESKTOP */ }; static UINT winproc_used = NB_BUILTIN_WINPROCS; @@ -104,14 +105,14 @@ static inline WINDOWPROC *find_winproc( WNDPROC funcA, WNDPROC funcW ) { unsigned int i; - for (i = 0; i < NB_BUILTIN_WINPROCS; i++) + for (i = 0; i < NB_BUILTIN_AW_WINPROCS; i++) { /* match either proc, some apps confuse A and W */ if (funcA && winproc_array[i].procA != funcA && winproc_array[i].procW != funcA) continue; if (funcW && winproc_array[i].procA != funcW && winproc_array[i].procW != funcW) continue; return &winproc_array[i]; } - for (i = NB_BUILTIN_WINPROCS; i < winproc_used; i++) + for (i = NB_BUILTIN_AW_WINPROCS; i < winproc_used; i++) { if (funcA && winproc_array[i].procA != funcA) continue; if (funcW && winproc_array[i].procW != funcW) continue;
1
0
0
0
Huw Davies : dsound: Fix a memory leak in the tests.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: 14fdced3653da6d022200ae66b5e89e1f92a555e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14fdced3653da6d022200ae66…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Dec 18 10:10:18 2009 +0000 dsound: Fix a memory leak in the tests. Found by Valgrind. --- dlls/dsound/tests/propset.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c index 70a8e0d..5007fcc 100644 --- a/dlls/dsound/tests/propset.c +++ b/dlls/dsound/tests/propset.c @@ -550,6 +550,7 @@ static void propset_private_tests(void) NULL, 0, &data, sizeof(data), &bytes); ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); } + IKsPropertySet_Release(pps); } static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
1
0
0
0
Hans Leidekker : msi: Propagate errors from IStorage_OpenStream again in db_get_raw_stream.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: 839e487c842d328fe4fa7823a5f3f7d51c54ba42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=839e487c842d328fe4fa7823a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Dec 18 11:03:03 2009 +0100 msi: Propagate errors from IStorage_OpenStream again in db_get_raw_stream. Fixes a regression introduced by ef522c5ef0aeb2563885ad0a70ffe3fa3f1489f5. --- dlls/msi/database.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 87fc113..b0966a2 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -167,7 +167,7 @@ UINT db_get_raw_stream( MSIDATABASE *db, LPCWSTR stname, IStream **stm ) list_add_tail( &db->streams, &stream->entry ); } - return ERROR_SUCCESS; + return SUCCEEDED(r) ? ERROR_SUCCESS : ERROR_FUNCTION_FAILED; } UINT read_raw_stream_data( MSIDATABASE *db, LPCWSTR stname,
1
0
0
0
Hans Leidekker : msi: Avoid a crash in STREAMS_delete.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: 699cfc915abf823ba916b39a2cbd2eba3890f17f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=699cfc915abf823ba916b39a2…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Dec 18 11:02:30 2009 +0100 msi: Avoid a crash in STREAMS_delete. --- dlls/msi/streams.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c index 6b281f4..4825ae6 100644 --- a/dlls/msi/streams.c +++ b/dlls/msi/streams.c @@ -400,10 +400,14 @@ static UINT STREAMS_delete(struct tagMSIVIEW *view) for (i = 0; i < sv->num_rows; i++) { - if (sv->streams[i] && sv->streams[i]->stream) - IStream_Release(sv->streams[i]->stream); - msi_free(sv->streams[i]->name); - msi_free(sv->streams[i]); + if (sv->streams[i]) + { + if (sv->streams[i]->stream) + IStream_Release(sv->streams[i]->stream); + + msi_free(sv->streams[i]->name); + msi_free(sv->streams[i]); + } } msi_free(sv->streams);
1
0
0
0
James Hawkins : msi: Free the current filename if we choose to not extract the file.
by Alexandre Julliard
18 Dec '09
18 Dec '09
Module: wine Branch: master Commit: d9c52bfa70d694e89511129e8f04caa6b22ce053 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d9c52bfa70d694e89511129e8…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Dec 17 20:00:45 2009 -0800 msi: Free the current filename if we choose to not extract the file. --- dlls/msi/media.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/msi/media.c b/dlls/msi/media.c index 67d73cc..0a6c431 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -334,7 +334,12 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, data->curfile = strdupAtoW(pfdin->psz1); if (!data->cb(data->package, data->curfile, MSICABEXTRACT_BEGINEXTRACT, &path, &attrs, data->user)) + { + /* We're not extracting this file, so free the filename. */ + msi_free(data->curfile); + data->curfile = NULL; goto done; + } TRACE("extracting %s\n", debugstr_w(path));
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
124
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200