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
February 2017
----- 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
2 participants
838 discussions
Start a n
N
ew thread
Fabian Maurer : user32/tests: Add tests for disabled buttons receiving WM_LBUTTONUP.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 43b0dce2032e757b54540baa639b5880a3cfa528 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43b0dce2032e757b54540baa6…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Thu Feb 9 20:37:02 2017 +0100 user32/tests: Add tests for disabled buttons receiving WM_LBUTTONUP. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 1752b68..e95d435 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -6060,6 +6060,23 @@ static const struct message WmClearStateButtonSeq[] = { WM_APP, sent|wparam|lparam, 0, 0 }, { 0 } }; +static const struct message WmDisableButtonSeq[] = +{ + { WM_LBUTTONDOWN, sent }, + { BM_SETSTATE, sent|defwinproc }, + { WM_CTLCOLORSTATIC, sent|defwinproc|optional }, + { WM_CTLCOLORBTN, sent|optional }, + { WM_LBUTTONUP, sent }, + { BM_SETSTATE, sent|defwinproc }, + { WM_CTLCOLORBTN, sent|defwinproc|optional }, + { WM_CTLCOLORSTATIC, sent|defwinproc|optional }, + { BM_SETCHECK, sent|defwinproc|optional }, + { WM_CTLCOLORBTN, sent|optional }, + { WM_CTLCOLORSTATIC, sent|defwinproc|optional }, + { WM_CAPTURECHANGED, sent|defwinproc }, + { WM_COMMAND, sent }, + { 0 } +}; static const struct message WmClearStateOwnerdrawSeq[] = { { BM_SETSTATE, sent }, @@ -6448,6 +6465,24 @@ static void test_button_messages(void) DeleteObject(hfont2); DestroyWindow(parent); + + /* Test if WM_LBUTTONDOWN and WM_LBUTTONUP to a disabled button leads to a WM_COMMAND for the parent */ + + parent = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 100, 100, 200, 200, 0, 0, 0, NULL); + ok (hwnd != 0, "Failed to create overlapped window\n"); + + hwnd = CreateWindowExA(0, "my_button_class", "test", BS_DEFPUSHBUTTON | WS_VISIBLE | WS_CHILD, + 0, 0, 50, 14, parent, 0, 0, NULL); + + EnableWindow(hwnd, FALSE); + flush_sequence(); + SendMessageA(hwnd, WM_LBUTTONDOWN, MK_LBUTTON, 0); + SendMessageA(hwnd, WM_LBUTTONUP, 0, 0); + ok_sequence(WmDisableButtonSeq, "Mouseclick on a disabled button", FALSE); + + DestroyWindow(hwnd); + DestroyWindow(parent); } /****************** static message test *************************/
1
0
0
0
Nikolay Sivov : comctl32/propsheet: Implement PSM_SETHEADERSUBTITLE.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 83cde0693704c18d370e0caae5132ef62b415ae3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83cde0693704c18d370e0caae…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 16 21:34:21 2017 +0300 comctl32/propsheet: Implement PSM_SETHEADERSUBTITLE. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/propsheet.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 5fc1474..a3a6a5c 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -33,7 +33,6 @@ * - Enforcing of minimal wizard size * - Messages: * o PSM_RECALCPAGESIZES - * o PSM_SETHEADERSUBTITLE * o WM_HELP * o WM_CONTEXTMENU * - Notifications: @@ -2532,17 +2531,37 @@ static void PROPSHEET_SetHeaderTitleA(HWND hwndDlg, UINT page_index, const char /****************************************************************************** * PROPSHEET_SetHeaderSubTitleW */ -static void PROPSHEET_SetHeaderSubTitleW(HWND hwndDlg, int iPageIndex, LPCWSTR pszHeaderSubTitle) +static void PROPSHEET_SetHeaderSubTitleW(HWND hwndDlg, UINT page_index, const WCHAR *subtitle) { - FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_w(pszHeaderSubTitle)); + PropSheetInfo *psInfo = GetPropW(hwndDlg, PropSheetInfoStr); + PROPSHEETPAGEW *page; + + TRACE("(%p, %u, %s)\n", hwndDlg, page_index, debugstr_w(subtitle)); + + if (page_index >= psInfo->nPages) + return; + + page = (PROPSHEETPAGEW *)psInfo->proppage[page_index].hpage; + + if (!IS_INTRESOURCE(page->pszHeaderSubTitle)) + Free((void *)page->pszHeaderSubTitle); + + page->pszHeaderSubTitle = heap_strdupW(subtitle); + page->dwFlags |= PSP_USEHEADERSUBTITLE; } /****************************************************************************** * PROPSHEET_SetHeaderSubTitleA */ -static void PROPSHEET_SetHeaderSubTitleA(HWND hwndDlg, int iPageIndex, LPCSTR pszHeaderSubTitle) +static void PROPSHEET_SetHeaderSubTitleA(HWND hwndDlg, UINT page_index, const char *subtitle) { - FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_a(pszHeaderSubTitle)); + WCHAR *subtitleW; + + TRACE("(%p, %u, %s)\n", hwndDlg, page_index, debugstr_a(subtitle)); + + subtitleW = heap_strdupAtoW(subtitle); + PROPSHEET_SetHeaderSubTitleW(hwndDlg, page_index, subtitleW); + Free(subtitleW); } /****************************************************************************** @@ -3750,11 +3769,11 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return TRUE; case PSM_SETHEADERSUBTITLEW: - PROPSHEET_SetHeaderSubTitleW(hwnd, (int)wParam, (LPCWSTR)lParam); + PROPSHEET_SetHeaderSubTitleW(hwnd, wParam, (LPCWSTR)lParam); return TRUE; case PSM_SETHEADERSUBTITLEA: - PROPSHEET_SetHeaderSubTitleA(hwnd, (int)wParam, (LPCSTR)lParam); + PROPSHEET_SetHeaderSubTitleA(hwnd, wParam, (LPCSTR)lParam); return TRUE; case PSM_HWNDTOINDEX:
1
0
0
0
Nikolay Sivov : comctl32/propsheet: Implement PSM_SETHEADERTITLE.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: ce9c06be2b30b1218bb416c28d8f569fcaec3dd0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce9c06be2b30b1218bb416c28…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 16 21:34:20 2017 +0300 comctl32/propsheet: Implement PSM_SETHEADERTITLE. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/propsheet.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index be787cd..5fc1474 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -34,7 +34,6 @@ * - Messages: * o PSM_RECALCPAGESIZES * o PSM_SETHEADERSUBTITLE - * o PSM_SETHEADERTITLE * o WM_HELP * o WM_CONTEXTMENU * - Notifications: @@ -2497,17 +2496,37 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags) /****************************************************************************** * PROPSHEET_SetHeaderTitleW */ -static void PROPSHEET_SetHeaderTitleW(HWND hwndDlg, int iPageIndex, LPCWSTR pszHeaderTitle) +static void PROPSHEET_SetHeaderTitleW(HWND hwndDlg, UINT page_index, const WCHAR *title) { - FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_w(pszHeaderTitle)); + PropSheetInfo *psInfo = GetPropW(hwndDlg, PropSheetInfoStr); + PROPSHEETPAGEW *page; + + TRACE("(%p, %u, %s)\n", hwndDlg, page_index, debugstr_w(title)); + + if (page_index >= psInfo->nPages) + return; + + page = (PROPSHEETPAGEW *)psInfo->proppage[page_index].hpage; + + if (!IS_INTRESOURCE(page->pszHeaderTitle)) + Free((void *)page->pszHeaderTitle); + + page->pszHeaderTitle = heap_strdupW(title); + page->dwFlags |= PSP_USEHEADERTITLE; } /****************************************************************************** * PROPSHEET_SetHeaderTitleA */ -static void PROPSHEET_SetHeaderTitleA(HWND hwndDlg, int iPageIndex, LPCSTR pszHeaderTitle) +static void PROPSHEET_SetHeaderTitleA(HWND hwndDlg, UINT page_index, const char *title) { - FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_a(pszHeaderTitle)); + WCHAR *titleW; + + TRACE("(%p, %u, %s)\n", hwndDlg, page_index, debugstr_a(title)); + + titleW = heap_strdupAtoW(title); + PROPSHEET_SetHeaderTitleW(hwndDlg, page_index, titleW); + Free(titleW); } /****************************************************************************** @@ -3723,11 +3742,11 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } case PSM_SETHEADERTITLEW: - PROPSHEET_SetHeaderTitleW(hwnd, (int)wParam, (LPCWSTR)lParam); + PROPSHEET_SetHeaderTitleW(hwnd, wParam, (LPCWSTR)lParam); return TRUE; case PSM_SETHEADERTITLEA: - PROPSHEET_SetHeaderTitleA(hwnd, (int)wParam, (LPCSTR)lParam); + PROPSHEET_SetHeaderTitleA(hwnd, wParam, (LPCSTR)lParam); return TRUE; case PSM_SETHEADERSUBTITLEW:
1
0
0
0
Nikolay Sivov : comctl32/propsheet: Add helpers to do string duplication.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 1a750f7b10c0acfbbb21b2b2272436f724b0b8c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a750f7b10c0acfbbb21b2b22…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 16 21:34:19 2017 +0300 comctl32/propsheet: Add helpers to do string duplication. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/propsheet.c | 84 +++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 50 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index caf7181..be787cd 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -177,6 +177,26 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); WINE_DEFAULT_DEBUG_CHANNEL(propsheet); +static WCHAR *heap_strdupW(const WCHAR *str) +{ + int len = strlenW(str) + 1; + WCHAR *ret = Alloc(len * sizeof(WCHAR)); + strcpyW(ret, str); + return ret; +} + +static WCHAR *heap_strdupAtoW(const char *str) +{ + WCHAR *ret; + INT len; + + len = MultiByteToWideChar(CP_ACP, 0, str, -1, 0, 0); + ret = Alloc(len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); + + return ret; +} + #define add_flag(a) if (dwFlags & a) {strcat(string, #a );strcat(string," ");} /****************************************************************************** * PROPSHEET_UnImplementedFlags @@ -270,23 +290,6 @@ static INT PROPSHEET_FindPageByResId(const PropSheetInfo * psInfo, LRESULT resId } /****************************************************************************** - * PROPSHEET_AtoW - * - * Convert ASCII to Unicode since all data is saved as Unicode. - */ -static void PROPSHEET_AtoW(LPCWSTR *tostr, LPCSTR frstr) -{ - INT len; - WCHAR *to; - - TRACE("<%s>\n", frstr); - len = MultiByteToWideChar(CP_ACP, 0, frstr, -1, 0, 0); - to = Alloc(len * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, frstr, -1, to, len); - *tostr = to; -} - -/****************************************************************************** * PROPSHEET_CollectSheetInfoCommon * * Common code for PROPSHEET_CollectSheetInfoA/W @@ -374,12 +377,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh, else { if (!IS_INTRESOURCE(lppsh->pszCaption)) - { - int len = strlenW(lppsh->pszCaption); - WCHAR *caption = Alloc( (len+1)*sizeof(WCHAR) ); - - psInfo->ppshheader.pszCaption = strcpyW( caption, lppsh->pszCaption ); - } + psInfo->ppshheader.pszCaption = heap_strdupW( lppsh->pszCaption ); } psInfo->nPages = lppsh->nPages; @@ -552,8 +550,6 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp, WCHAR szTitle[256]; const WCHAR *pTitle; static const WCHAR pszNull[] = { '(','n','u','l','l',')',0 }; - WCHAR *text; - int len; if (IS_INTRESOURCE( lppsp->pszTitle )) { @@ -567,9 +563,7 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp, else pTitle = lppsp->pszTitle; - len = strlenW(pTitle); - text = Alloc( (len+1)*sizeof (WCHAR) ); - psInfo->proppage[index].pszText = strcpyW( text, pTitle); + psInfo->proppage[index].pszText = heap_strdupW( pTitle ); } /* @@ -2945,15 +2939,15 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA( if (ppsp->dwFlags & PSP_USEICONID) { if (!IS_INTRESOURCE( ppsp->u2.pszIcon )) - PROPSHEET_AtoW(&ppsp->u2.pszIcon, lpPropSheetPage->u2.pszIcon); + ppsp->u2.pszIcon = heap_strdupAtoW( lpPropSheetPage->u2.pszIcon ); } if (ppsp->dwFlags & PSP_USETITLE) { - if (!IS_INTRESOURCE( ppsp->pszTitle )) - PROPSHEET_AtoW( &ppsp->pszTitle, lpPropSheetPage->pszTitle ); - else + if (IS_INTRESOURCE( ppsp->pszTitle )) ppsp->pszTitle = load_string( ppsp->hInstance, ppsp->pszTitle ); + else + ppsp->pszTitle = heap_strdupAtoW( lpPropSheetPage->pszTitle ); } else ppsp->pszTitle = NULL; @@ -2963,20 +2957,20 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA( if (ppsp->dwFlags & PSP_USEHEADERTITLE) { - if (!IS_INTRESOURCE( ppsp->pszHeaderTitle )) - PROPSHEET_AtoW(&ppsp->pszHeaderTitle, lpPropSheetPage->pszHeaderTitle); - else + if (IS_INTRESOURCE( ppsp->pszHeaderTitle )) ppsp->pszHeaderTitle = load_string( ppsp->hInstance, ppsp->pszHeaderTitle ); + else + ppsp->pszHeaderTitle = heap_strdupAtoW( lpPropSheetPage->pszHeaderTitle ); } else ppsp->pszHeaderTitle = NULL; if (ppsp->dwFlags & PSP_USEHEADERSUBTITLE) { - if (!IS_INTRESOURCE( ppsp->pszHeaderSubTitle )) - PROPSHEET_AtoW(&ppsp->pszHeaderSubTitle, lpPropSheetPage->pszHeaderSubTitle); - else + if (IS_INTRESOURCE( ppsp->pszHeaderSubTitle )) ppsp->pszHeaderSubTitle = load_string( ppsp->hInstance, ppsp->pszHeaderSubTitle ); + else + ppsp->pszHeaderSubTitle = heap_strdupAtoW( lpPropSheetPage->pszHeaderSubTitle ); } else ppsp->pszHeaderSubTitle = NULL; @@ -3000,23 +2994,13 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) ) { if (!IS_INTRESOURCE( ppsp->u.pszTemplate )) - { - int len = strlenW(lpPropSheetPage->u.pszTemplate) + 1; - WCHAR *template = Alloc( len * sizeof (WCHAR) ); - - ppsp->u.pszTemplate = strcpyW( template, lpPropSheetPage->u.pszTemplate ); - } + ppsp->u.pszTemplate = heap_strdupW( lpPropSheetPage->u.pszTemplate ); } if ( ppsp->dwFlags & PSP_USEICONID ) { if (!IS_INTRESOURCE( ppsp->u2.pszIcon )) - { - int len = strlenW(lpPropSheetPage->u2.pszIcon) + 1; - WCHAR *icon = Alloc( len * sizeof (WCHAR) ); - - ppsp->u2.pszIcon = strcpyW( icon, lpPropSheetPage->u2.pszIcon ); - } + ppsp->u2.pszIcon = heap_strdupW( lpPropSheetPage->u2.pszIcon ); } if (ppsp->dwFlags & PSP_USETITLE)
1
0
0
0
Zebediah Figura : storage.dll16: Set OpenStorage/ OpenStream output to NULL on failure.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 74ed392f85834555bc1f5fb235ccb54abaffbb38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74ed392f85834555bc1f5fb23…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Feb 11 17:40:11 2017 -0600 storage.dll16: Set OpenStorage/OpenStream output to NULL on failure. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/storage.dll16/storage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/storage.dll16/storage.c b/dlls/storage.dll16/storage.c index 2ce3571..cac616c 100644 --- a/dlls/storage.dll16/storage.c +++ b/dlls/storage.dll16/storage.c @@ -1859,11 +1859,13 @@ HRESULT CDECL IStorage16_fnOpenStorage(IStorage16 *iface, LPCOLESTR16 pwcsName, newpps = STORAGE_look_for_named_pps(&lpstg->str,This->stde.pps_dir,name); if (newpps==-1) { IStorage16_fnRelease(&lpstg->IStorage16_iface); + *ppstg = NULL; return E_FAIL; } if (1!=STORAGE_get_pps_entry(&lpstg->str,newpps,&(lpstg->stde))) { IStorage16_fnRelease(&lpstg->IStorage16_iface); + *ppstg = NULL; return E_FAIL; } lpstg->ppsent = newpps; @@ -1899,11 +1901,13 @@ HRESULT CDECL IStorage16_fnOpenStream(IStorage16 *iface, LPCOLESTR16 pwcsName, v newpps = STORAGE_look_for_named_pps(&lpstr->str,This->stde.pps_dir,name); if (newpps==-1) { IStream16_fnRelease(&lpstr->IStream16_iface); + *ppstm = NULL; return E_FAIL; } if (1!=STORAGE_get_pps_entry(&lpstr->str,newpps,&(lpstr->stde))) { IStream16_fnRelease(&lpstr->IStream16_iface); + *ppstm = NULL; return E_FAIL; } lpstr->offset.u.LowPart = 0;
1
0
0
0
Zebediah Figura : storage.dll16: Simplify operations in IStream16::Seek.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 3085e7339210ce946481150f9dd55bb5b3c824a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3085e7339210ce946481150f9…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Feb 14 09:41:53 2017 -0600 storage.dll16: Simplify operations in IStream16::Seek. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/storage.dll16/storage.c | 63 ++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/dlls/storage.dll16/storage.c b/dlls/storage.dll16/storage.c index 74aa7f9..2ce3571 100644 --- a/dlls/storage.dll16/storage.c +++ b/dlls/storage.dll16/storage.c @@ -1179,44 +1179,33 @@ ULONG CDECL IStream16_fnRelease(IStream16 *iface) * Does not handle 64 bits */ HRESULT CDECL IStream16_fnSeek(IStream16 *iface, LARGE_INTEGER offset, DWORD whence, - ULARGE_INTEGER *newpos) + ULARGE_INTEGER *newpos) { - IStream16Impl *This = impl_from_IStream16(iface); - TRACE_(relay)("(%p)->([%d.%d],%d,%p)\n",This,offset.u.HighPart,offset.u.LowPart,whence,newpos); - - switch (whence) { - /* unix SEEK_xx should be the same as win95 ones */ - case SEEK_SET: - /* offset must be ==0 (<0 is invalid, and >0 cannot be handled - * right now. - */ - assert(offset.u.HighPart==0); - This->offset.u.HighPart = offset.u.HighPart; - This->offset.u.LowPart = offset.u.LowPart; - break; - case SEEK_CUR: - if (offset.u.HighPart < 0) { - /* FIXME: is this negation correct ? */ - offset.u.HighPart = -offset.u.HighPart; - offset.u.LowPart = (0xffffffff ^ offset.u.LowPart)+1; - - assert(offset.u.HighPart==0); - assert(This->offset.u.LowPart >= offset.u.LowPart); - This->offset.u.LowPart -= offset.u.LowPart; - } else { - assert(offset.u.HighPart==0); - This->offset.u.LowPart+= offset.u.LowPart; - } - break; - case SEEK_END: - assert(offset.u.HighPart==0); - This->offset.u.LowPart = This->stde.pps_size-offset.u.LowPart; - break; - } - if (This->offset.u.LowPart>This->stde.pps_size) - This->offset.u.LowPart=This->stde.pps_size; - if (newpos) *newpos = This->offset; - return S_OK; + IStream16Impl *This = impl_from_IStream16(iface); + TRACE_(relay)("(%p)->([%d.%d],%d,%p)\n",This,offset.u.HighPart,offset.u.LowPart,whence,newpos); + + switch (whence) { + case STREAM_SEEK_SET: + This->offset.QuadPart = offset.QuadPart; + break; + case STREAM_SEEK_CUR: + if ((offset.QuadPart < 0 && -offset.QuadPart > This->offset.QuadPart) || + (offset.QuadPart > 0 && -offset.QuadPart <= This->offset.QuadPart)) + return STG_E_INVALIDFUNCTION; + This->offset.QuadPart += offset.QuadPart; + break; + case STREAM_SEEK_END: + if (-offset.QuadPart > This->stde.pps_size) + return STG_E_INVALIDFUNCTION; + + This->offset.QuadPart = This->stde.pps_size + offset.QuadPart; + break; + } + + if (This->offset.QuadPart>This->stde.pps_size) + This->offset.QuadPart=This->stde.pps_size; + if (newpos) *newpos = This->offset; + return S_OK; } /******************************************************************************
1
0
0
0
Jonathan Doron : kernel32: Added implementation of FileIdInfo for GetFileInformationByHandleEx.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 163ebdfa96afee7107f5825505ada6bffaffb814 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=163ebdfa96afee7107f582550…
Author: Jonathan Doron <jond(a)wizery.com> Date: Thu Feb 16 18:18:02 2017 +0100 kernel32: Added implementation of FileIdInfo for GetFileInformationByHandleEx. Signed-off-by: Jonathan Doron <jond(a)wizery.com> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index cc7ead1..3e93b0d 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -926,7 +926,6 @@ BOOL WINAPI GetFileInformationByHandleEx( HANDLE handle, FILE_INFO_BY_HANDLE_CLA case FileFullDirectoryRestartInfo: case FileStorageInfo: case FileAlignmentInfo: - case FileIdInfo: case FileIdExtdDirectoryInfo: case FileIdExtdDirectoryRestartInfo: FIXME( "%p, %u, %p, %u\n", handle, class, info, size ); @@ -945,6 +944,10 @@ BOOL WINAPI GetFileInformationByHandleEx( HANDLE handle, FILE_INFO_BY_HANDLE_CLA status = NtQueryInformationFile( handle, &io, info, size, FileNameInformation ); break; + case FileIdInfo: + status = NtQueryInformationFile( handle, &io, info, size, FileIdInformation ); + break; + case FileIdBothDirectoryRestartInfo: case FileIdBothDirectoryInfo: status = NtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, info, size,
1
0
0
0
Sebastian Lackner : ntdll: Implement FileIdInformation class in NtQueryInformationFile.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 627829daa3d4f06c353a40af38ff3df85ad8f887 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=627829daa3d4f06c353a40af3…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Thu Feb 16 18:17:51 2017 +0100 ntdll: Implement FileIdInformation class in NtQueryInformationFile. Based on a patch by Jonathan Doron. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/file.c | 12 +++++++++++- dlls/ntdll/tests/file.c | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index f3ff163..fd7f3dd 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -2375,7 +2375,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io, 0, /* FileRenameInformationBypassAccessCheck */ 0, /* FileLinkInformationBypassAccessCheck */ 0, /* FileVolumeNameInformation */ - 0, /* FileIdInformation */ + sizeof(FILE_ID_INFORMATION), /* FileIdInformation */ 0, /* FileIdExtdDirectoryInformation */ 0, /* FileReplaceCompletionInformation */ 0, /* FileHardLinkFullIdInformation */ @@ -2617,6 +2617,16 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io, } } break; + case FileIdInformation: + if (fd_get_file_info( fd, &st, &attr ) == -1) io->u.Status = FILE_GetNtStatus(); + else + { + FILE_ID_INFORMATION *info = ptr; + info->VolumeSerialNumber = 0; /* FIXME */ + memset( &info->FileId, 0, sizeof(info->FileId) ); + *(ULONGLONG *)&info->FileId = st.st_ino; + } + break; default: FIXME("Unsupported class (%d)\n", class); io->u.Status = STATUS_NOT_IMPLEMENTED; diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index e95815c..1a02ce5 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -3277,7 +3277,7 @@ static void test_file_id_information(void) status = pNtQueryInformationFile( h, &io, &fid, sizeof(fid), FileIdInformation ); if (status == STATUS_NOT_IMPLEMENTED || status == STATUS_INVALID_INFO_CLASS) { - skip( "FileIdInformation not supported\n" ); + win_skip( "FileIdInformation not supported\n" ); CloseHandle( h ); return; }
1
0
0
0
Sebastian Lackner : ntdll/tests: Add tests for FileIdInformation class.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 8b3d43acab869d1846704c3170fc071b5e4a04fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b3d43acab869d1846704c317…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Thu Feb 16 18:17:05 2017 +0100 ntdll/tests: Add tests for FileIdInformation class. Based on a patch by Jonathan Doron. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/file.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 57d7df9..e95815c 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -3261,6 +3261,45 @@ static void test_file_all_name_information(void) HeapFree( GetProcessHeap(), 0, file_name ); } +static void test_file_id_information(void) +{ + BY_HANDLE_FILE_INFORMATION info; + FILE_ID_INFORMATION fid; + IO_STATUS_BLOCK io; + NTSTATUS status; + DWORD *dwords; + HANDLE h; + BOOL ret; + + if (!(h = create_temp_file(0))) return; + + memset( &fid, 0x11, sizeof(fid) ); + status = pNtQueryInformationFile( h, &io, &fid, sizeof(fid), FileIdInformation ); + if (status == STATUS_NOT_IMPLEMENTED || status == STATUS_INVALID_INFO_CLASS) + { + skip( "FileIdInformation not supported\n" ); + CloseHandle( h ); + return; + } + + memset( &info, 0x22, sizeof(info) ); + ret = GetFileInformationByHandle( h, &info ); + ok( ret, "GetFileInformationByHandle failed\n" ); + + dwords = (DWORD *)&fid.VolumeSerialNumber; + ok( dwords[0] == info.dwVolumeSerialNumber, "expected %08x, got %08x\n", + info.dwVolumeSerialNumber, dwords[0] ); + ok( dwords[1] != 0x11111111, "expected != 0x11111111\n" ); + + dwords = (DWORD *)&fid.FileId; + ok( dwords[0] == info.nFileIndexLow, "expected %08x, got %08x\n", info.nFileIndexLow, dwords[0] ); + ok( dwords[1] == info.nFileIndexHigh, "expected %08x, got %08x\n", info.nFileIndexHigh, dwords[1] ); + ok( dwords[2] == 0, "expected 0, got %08x\n", dwords[2] ); + ok( dwords[3] == 0, "expected 0, got %08x\n", dwords[3] ); + + CloseHandle( h ); +} + static void test_query_volume_information_file(void) { NTSTATUS status; @@ -4260,6 +4299,7 @@ START_TEST(file) test_file_rename_information(); test_file_link_information(); test_file_disposition_information(); + test_file_id_information(); test_query_volume_information_file(); test_query_attribute_information_file(); }
1
0
0
0
Jonathan Doron : include: Add definition for FILE_ID_INFORMATION.
by Alexandre Julliard
16 Feb '17
16 Feb '17
Module: wine Branch: master Commit: 9e889691cf255a953e76c39f72ba6c8c38702b4a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e889691cf255a953e76c39f7…
Author: Jonathan Doron <jond(a)wizery.com> Date: Thu Feb 16 18:16:37 2017 +0100 include: Add definition for FILE_ID_INFORMATION. Signed-off-by: Jonathan Doron <jond(a)wizery.com> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/winternl.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/winternl.h b/include/winternl.h index 891b6a7..2f2ea86 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -571,6 +571,15 @@ typedef struct _FILE_INTERNAL_INFORMATION { LARGE_INTEGER IndexNumber; } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION; +typedef struct _FILE_ID_128 { + UCHAR Identifier[16]; +} FILE_ID_128, *PFILE_ID_128; + +typedef struct _FILE_ID_INFORMATION { + ULONGLONG VolumeSerialNumber; + FILE_ID_128 FileId; +} FILE_ID_INFORMATION, *PFILE_ID_INFORMATION; + typedef struct _FILE_EA_INFORMATION { ULONG EaSize; } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
84
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
Results per page:
10
25
50
100
200