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
2024
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
Download
wine-devel
October 2018
----- 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
[email protected]
60 participants
608 discussions
Start a n
N
ew thread
[PATCH 2/2] msvcr120: Added creal implementation.
by Piotr Caban
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> --- dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec | 3 ++- dlls/msvcr120/msvcr120.spec | 3 ++- dlls/msvcr120/tests/msvcr120.c | 7 +++++++ dlls/msvcr120_app/msvcr120_app.spec | 3 ++- dlls/msvcrt/math.c | 5 +++++ dlls/ucrtbase/ucrtbase.spec | 3 ++- 6 files changed, 20 insertions(+), 4 deletions(-)
5 years, 7 months
1
0
0
0
[PATCH 1/2] msvcr120: Added _Cbuild implementation.
by Piotr Caban
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> --- .../api-ms-win-crt-math-l1-1-0.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120/tests/msvcr120.c | 23 ++++++++++++++++++++++ dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcrt/math.c | 7 +++++++ dlls/msvcrt/msvcrt.h | 1 + dlls/ucrtbase/ucrtbase.spec | 2 +- 7 files changed, 35 insertions(+), 4 deletions(-)
5 years, 7 months
1
0
0
0
[PATCH v2] d3dcompiler_43/tests: Avoid using GCC's typeof extension
by Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/d3dcompiler_43/tests/blob.c | 6 +++--- dlls/d3dcompiler_43/tests/reflection.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/d3dcompiler_43/tests/blob.c b/dlls/d3dcompiler_43/tests/blob.c index cc629fad84..443ed2754c 100644 --- a/dlls/d3dcompiler_43/tests/blob.c +++ b/dlls/d3dcompiler_43/tests/blob.c @@ -33,9 +33,9 @@ */ #define D3DERR_INVALIDCALL 0x8876086c -static typeof(D3DCreateBlob) *pD3DCreateBlob; -static typeof(D3DGetBlobPart) *pD3DGetBlobPart; -static typeof(D3DStripShader) *pD3DStripShader; +static HRESULT (WINAPI *pD3DCreateBlob)(SIZE_T, ID3DBlob **); +static HRESULT (WINAPI *pD3DGetBlobPart)(const void *, SIZE_T, D3D_BLOB_PART, UINT, ID3DBlob **); +static HRESULT (WINAPI *pD3DStripShader)(const void *, SIZE_T, UINT, ID3DBlob **); #define MAKE_TAG(ch0, ch1, ch2, ch3) \ ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \ diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c index 5a85159d89..2c1c9028bb 100644 --- a/dlls/d3dcompiler_43/tests/reflection.c +++ b/dlls/d3dcompiler_43/tests/reflection.c @@ -38,7 +38,7 @@ */ #define D3DERR_INVALIDCALL 0x8876086c -static typeof(D3DReflect) *pD3DReflect; +static HRESULT (WINAPI *pD3DReflect)(const void *, SIZE_T, REFIID, void **); /* Creator string for comparison - Version 9.29.952.3111 (43) */ static DWORD shader_creator[] = { -- 2.19.0
5 years, 7 months
2
1
0
0
[PATCH 2/2] msi: Add support for control event DirectoryListNew.
by Hans Leidekker
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=25687
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> --- dlls/msi/dialog.c | 164 ++++++++++++++++++++++++++++++++++++++-------------- dlls/msi/msi.rc | 1 + dlls/msi/resource.h | 2 + 3 files changed, 123 insertions(+), 44 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 68e8ab2258..b01374f5e1 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -2151,23 +2151,27 @@ struct msi_pathedit_info WNDPROC oldproc; }; +static WCHAR *get_path_property( msi_dialog *dialog, msi_control *control ) +{ + WCHAR *prop, *path; + BOOL indirect = control->attributes & msidbControlAttributesIndirect; + if (!(prop = msi_dialog_dup_property( dialog, control->property, indirect ))) return NULL; + path = msi_dialog_dup_property( dialog, prop, TRUE ); + msi_free( prop ); + return path; +} + static void msi_dialog_update_pathedit( msi_dialog *dialog, msi_control *control ) { - LPWSTR prop, path; - BOOL indirect; + WCHAR *path; if (!control && !(control = msi_dialog_find_control_by_type( dialog, szPathEdit ))) return; - indirect = control->attributes & msidbControlAttributesIndirect; - prop = msi_dialog_dup_property( dialog, control->property, indirect ); - path = msi_dialog_dup_property( dialog, prop, TRUE ); - + if (!(path = get_path_property( dialog, control ))) return; SetWindowTextW( control->hwnd, path ); SendMessageW( control->hwnd, EM_SETSEL, 0, -1 ); - msi_free( path ); - msi_free( prop ); } /* FIXME: test when this should fail */ @@ -2921,16 +2925,12 @@ static UINT msi_dialog_list_box( msi_dialog *dialog, MSIRECORD *rec ) static void msi_dialog_update_directory_combo( msi_dialog *dialog, msi_control *control ) { - LPWSTR prop, path; - BOOL indirect; + WCHAR *path; if (!control && !(control = msi_dialog_find_control_by_type( dialog, szDirectoryCombo ))) return; - indirect = control->attributes & msidbControlAttributesIndirect; - prop = msi_dialog_dup_property( dialog, control->property, indirect ); - path = msi_dialog_dup_property( dialog, prop, TRUE ); - + if (!(path = get_path_property( dialog, control ))) return; PathStripPathW( path ); PathRemoveBackslashW( path ); @@ -2938,7 +2938,6 @@ static void msi_dialog_update_directory_combo( msi_dialog *dialog, msi_control * SendMessageW( control->hwnd, CB_SETCURSEL, 0, 0 ); msi_free( path ); - msi_free( prop ); } static UINT msi_dialog_directory_combo( msi_dialog *dialog, MSIRECORD *rec ) @@ -2967,31 +2966,28 @@ static UINT msi_dialog_directory_combo( msi_dialog *dialog, MSIRECORD *rec ) static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *control ) { - WCHAR dir_spec[MAX_PATH]; + static const WCHAR asterisk[] = {'*',0}; + WCHAR dir_spec[MAX_PATH], *path; WIN32_FIND_DATAW wfd; - LPWSTR prop, path; - BOOL indirect; LVITEMW item; HANDLE file; - static const WCHAR asterisk[] = {'*',0}; - if (!control && !(control = msi_dialog_find_control_by_type( dialog, szDirectoryList ))) return; /* clear the list-view */ SendMessageW( control->hwnd, LVM_DELETEALLITEMS, 0, 0 ); - indirect = control->attributes & msidbControlAttributesIndirect; - prop = msi_dialog_dup_property( dialog, control->property, indirect ); - path = msi_dialog_dup_property( dialog, prop, TRUE ); - + if (!(path = get_path_property( dialog, control ))) return; lstrcpyW( dir_spec, path ); lstrcatW( dir_spec, asterisk ); file = FindFirstFileW( dir_spec, &wfd ); - if ( file == INVALID_HANDLE_VALUE ) + if (file == INVALID_HANDLE_VALUE) + { + msi_free( path ); return; + } do { @@ -3010,7 +3006,6 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c SendMessageW( control->hwnd, LVM_INSERTITEMW, 0, (LPARAM)&item ); } while ( FindNextFileW( file, &wfd ) ); - msi_free( prop ); msi_free( path ); FindClose( file ); } @@ -3043,38 +3038,110 @@ static UINT msi_dialog_directorylist_up( msi_dialog *dialog ) return ERROR_SUCCESS; } -static UINT msi_dialog_dirlist_handler( msi_dialog *dialog, - msi_control *control, WPARAM param ) +static WCHAR *get_unique_folder_name( const WCHAR *root, int *ret_len ) { - LPNMHDR nmhdr = (LPNMHDR)param; - WCHAR new_path[MAX_PATH]; - WCHAR text[MAX_PATH]; - LPWSTR path, prop; - BOOL indirect; + static const WCHAR fmtW[] = {'%','s','%','s',' ','%','u',0}; + WCHAR newfolder[MAX_PATH], *path, *ptr; + int len, count = 2; + + len = LoadStringW( msi_hInstance, IDS_NEWFOLDER, newfolder, ARRAY_SIZE(newfolder) ); + len += strlenW(root) + 1; + if (!(path = msi_alloc( (len + 4) * sizeof(WCHAR) ))) return NULL; + strcpyW( path, root ); + strcatW( path, newfolder ); + + for (;;) + { + if (GetFileAttributesW( path ) == INVALID_FILE_ATTRIBUTES) break; + if (count > 99) + { + msi_free( path ); + return NULL; + } + len = sprintfW( path, fmtW, root, newfolder, count++ ) + 1; + } + + ptr = strrchrW( path, '\\' ) + 1; + *ret_len = len - (ptr - path); + memmove( path, ptr, *ret_len * sizeof(WCHAR) ); + return path; +} + +static UINT msi_dialog_directorylist_new( msi_dialog *dialog ) +{ + msi_control *control; + WCHAR *path; LVITEMW item; int index; - if (nmhdr->code != LVN_ITEMACTIVATE) - return ERROR_SUCCESS; + control = msi_dialog_find_control_by_type( dialog, szDirectoryList ); + + if (!(path = get_path_property( dialog, control ))) return ERROR_OUTOFMEMORY; + + item.mask = LVIF_TEXT; + item.iItem = 0; + item.iSubItem = 0; + item.pszText = get_unique_folder_name( path, &item.cchTextMax ); - index = SendMessageW( control->hwnd, LVM_GETNEXTITEM, -1, LVNI_SELECTED ); - if ( index < 0 ) + index = SendMessageW( control->hwnd, LVM_INSERTITEMW, 0, (LPARAM)&item ); + SendMessageW( control->hwnd, LVM_ENSUREVISIBLE, index, 0 ); + SendMessageW( control->hwnd, LVM_EDITLABELW, index, -1 ); + + msi_free( path ); + msi_free( item.pszText ); + return ERROR_SUCCESS; +} + +static UINT msi_dialog_dirlist_handler( msi_dialog *dialog, msi_control *control, WPARAM param ) +{ + NMHDR *nmhdr = (NMHDR *)param; + WCHAR text[MAX_PATH], *new_path, *path, *prop; + BOOL indirect; + + switch (nmhdr->code) { - ERR("No list-view item selected!\n"); - return ERROR_FUNCTION_FAILED; + case LVN_ENDLABELEDITW: + { + NMLVDISPINFOW *info = (NMLVDISPINFOW *)param; + if (!info->item.pszText) return ERROR_SUCCESS; + lstrcpynW( text, info->item.pszText, ARRAY_SIZE(text) ); + text[ARRAY_SIZE(text) - 1] = 0; + break; } + case LVN_ITEMACTIVATE: + { + LVITEMW item; + int index = SendMessageW( control->hwnd, LVM_GETNEXTITEM, -1, LVNI_SELECTED ); + if (index < 0) + { + ERR("no list-view item selected\n"); + return ERROR_FUNCTION_FAILED; + } - item.iSubItem = 0; - item.pszText = text; - item.cchTextMax = MAX_PATH; - SendMessageW( control->hwnd, LVM_GETITEMTEXTW, index, (LPARAM)&item ); + item.iSubItem = 0; + item.pszText = text; + item.cchTextMax = MAX_PATH; + SendMessageW( control->hwnd, LVM_GETITEMTEXTW, index, (LPARAM)&item ); + text[ARRAY_SIZE(text) - 1] = 0; + break; + } + default: + return ERROR_SUCCESS; + } indirect = control->attributes & msidbControlAttributesIndirect; prop = msi_dialog_dup_property( dialog, control->property, indirect ); path = msi_dialog_dup_property( dialog, prop, TRUE ); + if (!(new_path = msi_alloc( (strlenW(path) + strlenW(text) + 2) * sizeof(WCHAR) ))) + { + msi_free( prop ); + msi_free( path ); + return ERROR_OUTOFMEMORY; + } lstrcpyW( new_path, path ); lstrcatW( new_path, text ); + if (nmhdr->code == LVN_ENDLABELEDITW) CreateDirectoryW( new_path, NULL ); lstrcatW( new_path, szBackSlash ); msi_dialog_set_property( dialog->package, prop, new_path ); @@ -3085,6 +3152,8 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog, msi_free( prop ); msi_free( path ); + msi_free( new_path ); + return ERROR_SUCCESS; } @@ -3094,7 +3163,7 @@ static UINT msi_dialog_directory_list( msi_dialog *dialog, MSIRECORD *rec ) LPCWSTR prop; DWORD style; - style = LVS_LIST | WS_VSCROLL | LVS_SHAREIMAGELISTS | + style = LVS_LIST | WS_VSCROLL | LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_BORDER | LVS_SORTASCENDING | WS_CHILD | WS_GROUP | WS_TABSTOP; control = msi_dialog_add_control( dialog, rec, WC_LISTVIEWW, style ); @@ -4516,6 +4585,11 @@ static UINT event_directory_list_up( msi_dialog *dialog, const WCHAR *argument ) return msi_dialog_directorylist_up( dialog ); } +static UINT event_directory_list_new( msi_dialog *dialog, const WCHAR *argument ) +{ + return msi_dialog_directorylist_new( dialog ); +} + static UINT event_reinstall_mode( msi_dialog *dialog, const WCHAR *argument ) { return msi_set_property( dialog->package->db, szReinstallMode, argument, -1 ); @@ -4543,6 +4617,7 @@ static const WCHAR set_target_pathW[] = {'S','e','t','T','a','r','g','e','t','P' static const WCHAR resetW[] = {'R','e','s','e','t',0}; static const WCHAR set_install_levelW[] = {'S','e','t','I','n','s','t','a','l','l','L','e','v','e','l',0}; static const WCHAR directory_list_upW[] = {'D','i','r','e','c','t','o','r','y','L','i','s','t','U','p',0}; +static const WCHAR directory_list_newW[] = {'D','i','r','e','c','t','o','r','y','L','i','s','t','N','e','w',0}; static const WCHAR selection_browseW[] = {'S','e','l','e','c','t','i','o','n','B','r','o','w','s','e',0}; static const WCHAR reinstall_modeW[] = {'R','e','i','n','s','t','a','l','l','M','o','d','e',0}; static const WCHAR reinstallW[] = {'R','e','i','n','s','t','a','l','l',0}; @@ -4562,6 +4637,7 @@ static const struct control_event control_events[] = { resetW, event_reset }, { set_install_levelW, event_set_install_level }, { directory_list_upW, event_directory_list_up }, + { directory_list_newW, event_directory_list_new }, { selection_browseW, event_spawn_dialog }, { reinstall_modeW, event_reinstall_mode }, { reinstallW, event_reinstall }, diff --git a/dlls/msi/msi.rc b/dlls/msi/msi.rc index 14f98667d5..7b0b57e291 100644 --- a/dlls/msi/msi.rc +++ b/dlls/msi/msi.rc @@ -62,6 +62,7 @@ STRINGTABLE 13 "network drive for feature missing" 14 "feature from:" 15 "choose which folder contains %s" + 100 "New Folder" } /* Error messages */ diff --git a/dlls/msi/resource.h b/dlls/msi/resource.h index 045aa209c9..c63266e7d0 100644 --- a/dlls/msi/resource.h +++ b/dlls/msi/resource.h @@ -23,6 +23,8 @@ #define MSIERR_INFO_ACTIONSTART 14 #define MSIERR_INFO_ACTIONENDED 15 +#define IDS_NEWFOLDER 100 + #define MSIERR_INSERTDISK 1302 #define MSIERR_CABNOTFOUND 1311 -- 2.11.0
5 years, 7 months
1
0
0
0
[PATCH 1/2] msi: Fix a couple of memory leaks (Valgrind).
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> --- dlls/msi/install.c | 7 ++++--- dlls/msi/package.c | 4 ++++ dlls/msi/streams.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/msi/install.c b/dlls/msi/install.c index ce36bd3335..2cdebd2ad3 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -411,8 +411,7 @@ WCHAR *msi_resolve_source_folder( MSIPACKAGE *package, const WCHAR *name, MSIFOL UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DWORD *sz) { MSIPACKAGE *package; - const WCHAR *path; - WCHAR *folderW; + WCHAR *path, *folderW; UINT r; TRACE("%s %p %p\n", debugstr_a(folder), buf, sz); @@ -459,6 +458,7 @@ UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DW else r = ERROR_DIRECTORY; + heap_free(path); heap_free(folderW); msiobj_release(&package->hdr); return r; @@ -470,7 +470,7 @@ UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DW UINT WINAPI MsiGetSourcePathW(MSIHANDLE hinst, const WCHAR *folder, WCHAR *buf, DWORD *sz) { MSIPACKAGE *package; - const WCHAR *path; + WCHAR *path; UINT r; TRACE("%s %p %p\n", debugstr_w(folder), buf, sz); @@ -510,6 +510,7 @@ UINT WINAPI MsiGetSourcePathW(MSIHANDLE hinst, const WCHAR *folder, WCHAR *buf, else r = ERROR_DIRECTORY; + heap_free(path); msiobj_release(&package->hdr); return r; } diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 8e9ae6dd90..39a0a939b7 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -2125,6 +2125,7 @@ INT WINAPI MsiProcessMessage( MSIHANDLE hInstall, INSTALLMESSAGE eMessageType, ret = MSI_ProcessMessage( package, eMessageType, record ); + msiobj_release( &record->hdr ); msiobj_release( &package->hdr ); return ret; } @@ -2689,7 +2690,10 @@ UINT __cdecl s_remote_FormatRecord(MSIHANDLE hinst, struct wire_record *remote_r { *value = midl_user_allocate(++size * sizeof(WCHAR)); if (!*value) + { + MsiCloseHandle(rec); return ERROR_OUTOFMEMORY; + } r = MsiFormatRecordW(hinst, rec, *value, &size); } diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c index 7f9582cd4b..74ef899c1b 100644 --- a/dlls/msi/streams.c +++ b/dlls/msi/streams.c @@ -141,9 +141,9 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U old = sv->db->streams[row].stream; hr = IStream_QueryInterface( new, &IID_IStream, (void **)&sv->db->streams[row].stream ); + IStream_Release( new ); if (FAILED( hr )) { - IStream_Release( new ); return ERROR_FUNCTION_FAILED; } if (old) IStream_Release( old ); -- 2.11.0
5 years, 7 months
1
0
0
0
[PATCH 1/3] user32/tests: Add a test for custom dialog control data.
by Dmitry Timoshkov
Warning: this patch needs recent binutils that include fixed windres, otherwise cross-compilation of the test will fail. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/user32/tests/dialog.c | 38 +++++++++++++++++++++++++++++++++++ dlls/user32/tests/resource.rc | 9 +++++++++ 2 files changed, 47 insertions(+) diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index 0604423acf..b75759ba0a 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -544,6 +544,27 @@ static LRESULT CALLBACK testDlgWinProc (HWND hwnd, UINT uiMsg, WPARAM wParam, return DefDlgProcA (hwnd, uiMsg, wParam, lParam); } +static LRESULT CALLBACK test_control_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + switch(msg) + { + case WM_CREATE: + { + static const short sample[] = { 10,1,2,3,4,5 }; + CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam; + short *data = cs->lpCreateParams; +todo_wine + ok(!memcmp(data, sample, sizeof(sample)), "data mismatch: %d,%d,%d,%d,%d\n", data[0], data[1], data[2], data[3], data[4]); + } + return 0; + + default: + break; + } + + return DefWindowProcA(hwnd, msg, wparam, lparam); +} + static BOOL RegisterWindowClasses (void) { WNDCLASSA cls; @@ -563,7 +584,10 @@ static BOOL RegisterWindowClasses (void) cls.lpfnWndProc = main_window_procA; cls.lpszClassName = "IsDialogMessageWindowClass"; + if (!RegisterClassA (&cls)) return FALSE; + cls.lpfnWndProc = test_control_procA; + cls.lpszClassName = "TESTCONTROL"; if (!RegisterClassA (&cls)) return FALSE; GetClassInfoA(0, "#32770", &cls); @@ -2048,12 +2072,26 @@ static void test_MessageBox(void) UnhookWindowsHookEx(hook); } +static INT_PTR CALLBACK custom_test_dialog_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) +{ + if (msg == WM_INITDIALOG) + EndDialog(hdlg, 0); + + return FALSE; +} + +static void test_dialog_custom_data(void) +{ + DialogBoxA(g_hinst, "CUSTOM_TEST_DIALOG", NULL, custom_test_dialog_proc); +} + START_TEST(dialog) { g_hinst = GetModuleHandleA (0); if (!RegisterWindowClasses()) assert(0); + test_dialog_custom_data(); test_GetNextDlgItem(); test_IsDialogMessage(); test_WM_NEXTDLGCTL(); diff --git a/dlls/user32/tests/resource.rc b/dlls/user32/tests/resource.rc index 756e38f0f7..a9e45e90ce 100644 --- a/dlls/user32/tests/resource.rc +++ b/dlls/user32/tests/resource.rc @@ -206,6 +206,15 @@ FONT 8, "MS Shell Dlg" EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_READONLY } +CUSTOM_TEST_DIALOG DIALOGEX 6, 15, 207, 111 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Custom Test Dialog" +FONT 8, "MS Sans Serif" +{ + CONTROL "evenlengthtext", -1, "TESTCONTROL", WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 10,10,100,50 { 1,2,3,4,5 } + CONTROL "oddlengthtext", -1, "TESTCONTROL", WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 10,60,100,50 { 1,2,3,4,5 } +} + /* @makedep: test_mono.bmp */ 100 BITMAP test_mono.bmp -- 2.17.1
5 years, 7 months
2
2
0
0
[PATCH 3/3] user32: Fix the pointer to custom dialog control data.
by Dmitry Timoshkov
The fix is suggested by vendor2013(a)herdsoft.com. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/user32/dialog.c | 2 +- dlls/user32/tests/dialog.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index 7b918193fd..c5c646e0b1 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -197,7 +197,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info, TRACE("\n"); TRACE(" END\n" ); } - info->data = p + 1; + info->data = p; p += GET_WORD(p) / sizeof(WORD); } else info->data = NULL; diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index b75759ba0a..631f3d3b2b 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -553,7 +553,6 @@ static LRESULT CALLBACK test_control_procA(HWND hwnd, UINT msg, WPARAM wparam, L static const short sample[] = { 10,1,2,3,4,5 }; CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam; short *data = cs->lpCreateParams; -todo_wine ok(!memcmp(data, sample, sizeof(sample)), "data mismatch: %d,%d,%d,%d,%d\n", data[0], data[1], data[2], data[3], data[4]); } return 0; -- 2.17.1
5 years, 7 months
2
1
0
0
[PATCH 2/3] tools/wrc: Fix generation of custom dialog control data.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- tools/wrc/genres.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/wrc/genres.c b/tools/wrc/genres.c index 8c2f280ac5..939d2655b2 100644 --- a/tools/wrc/genres.c +++ b/tools/wrc/genres.c @@ -726,8 +726,7 @@ static res_t *dialog2res(name_id_t *name, dialog_t *dlg) put_word(res, 0); if(ctrl->extra) { - put_word(res, ctrl->extra->size+2); - put_pad(res); + put_word(res, ctrl->extra->size); put_raw_data(res, ctrl->extra, 0); } else -- 2.17.1
5 years, 7 months
1
0
0
0
← Newer
1
...
58
59
60
61
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
Results per page:
10
25
50
100
200