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
June 2010
----- 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
663 discussions
Start a n
N
ew thread
Luca Bennati : crypt32: Add Italian translation.
by Alexandre Julliard
17 Jun '10
17 Jun '10
Module: wine Branch: master Commit: 10a61681739f14119a4fdb243e6d3c7d85ed23bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10a61681739f14119a4fdb243…
Author: Luca Bennati <lucak3(a)gmail.com> Date: Wed Jun 16 16:50:37 2010 +0200 crypt32: Add Italian translation. --- dlls/crypt32/Makefile.in | 1 + dlls/crypt32/crypt32_It.rc | 244 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 245 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=10a61681739f14119a4fd…
1
0
0
0
Detlef Riekenberg : winspool/tests: Handle the Windows bug in GetPrinterDataEx.
by Alexandre Julliard
17 Jun '10
17 Jun '10
Module: wine Branch: master Commit: 2cbb9a1ee5bca8c0e83d769391469c66aaf7b351 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2cbb9a1ee5bca8c0e83d76939…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Jun 17 00:38:24 2010 +0200 winspool/tests: Handle the Windows bug in GetPrinterDataEx. --- dlls/winspool.drv/tests/info.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c index b86d367..b81bde4 100644 --- a/dlls/winspool.drv/tests/info.c +++ b/dlls/winspool.drv/tests/info.c @@ -2461,8 +2461,19 @@ static void test_GetPrinterDataEx(void) needed = 0xdeadbeef; SetLastError(0xdeadbeef); + /* vista and w2k8 have a bug in GetPrinterDataEx: + the current LastError value is returned as result */ res = pGetPrinterDataExA(hprn, NULL, defaultspooldirectory, NULL, NULL, 0, &needed); - ok( (res == ERROR_MORE_DATA) && ((needed == len) || (needed == (len * sizeof(WCHAR)))), + ok( ((res == ERROR_MORE_DATA) || broken(res == 0xdeadbeef)) && + ((needed == len) || (needed == (len * sizeof(WCHAR)))), + "got %d, needed: %d (expected ERROR_MORE_DATA and %d or %d)\n", + res, needed, len, len * sizeof(WCHAR)); + + needed = 0xdeadbeef; + SetLastError(0xdeaddead); + res = pGetPrinterDataExA(hprn, NULL, defaultspooldirectory, NULL, NULL, 0, &needed); + ok( ((res == ERROR_MORE_DATA) || broken(res == 0xdeaddead)) && + ((needed == len) || (needed == (len * sizeof(WCHAR)))), "got %d, needed: %d (expected ERROR_MORE_DATA and %d or %d)\n", res, needed, len, len * sizeof(WCHAR));
1
0
0
0
Michael Stefaniuc : wordpad: "Fix" two errors in the Chinese translations.
by Alexandre Julliard
17 Jun '10
17 Jun '10
Module: wine Branch: master Commit: fa2b3b1af273597bfe8cc2b5d5c64d02c940f5b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa2b3b1af273597bfe8cc2b5d…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jun 17 00:17:30 2010 +0200 wordpad: "Fix" two errors in the Chinese translations. By removing two stale copies of an English STRINGTABLE resource. --- programs/wordpad/Zh.rc | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/programs/wordpad/Zh.rc b/programs/wordpad/Zh.rc index 6adb30a..135f00c 100644 --- a/programs/wordpad/Zh.rc +++ b/programs/wordpad/Zh.rc @@ -250,13 +250,6 @@ BEGIN STRING_PREVIEW_ZOOMIN, "Zoom in" STRING_PREVIEW_ZOOMOUT, "Zoom out" STRING_PREVIEW_CLOSE, "关闭" - STRING_PREVIEW_PAGE, "Page" - STRING_PREVIEW_PAGES, "Pages" -END - -STRINGTABLE DISCARDABLE -BEGIN - STRING_UNITS_CM, "cm" END STRINGTABLE DISCARDABLE @@ -480,11 +473,6 @@ END STRINGTABLE DISCARDABLE BEGIN - STRING_UNITS_CM, "cm" -END - -STRINGTABLE DISCARDABLE -BEGIN STRING_DEFAULT_FILENAME, "Document" STRING_PROMPT_SAVE_CHANGES, "儲存改動到 '%s'?" STRING_SEARCH_FINISHED, "檔案查找結束."
1
0
0
0
Michael Stefaniuc : wordpad: Remove untranslated resources from the Hungarian translation.
by Alexandre Julliard
17 Jun '10
17 Jun '10
Module: wine Branch: master Commit: 31f8cbd513f1ab5dc5e80369a53e867677ea45bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=31f8cbd513f1ab5dc5e80369a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jun 17 00:18:08 2010 +0200 wordpad: Remove untranslated resources from the Hungarian translation. --- programs/wordpad/Hu.rc | 148 ------------------------------------------------ 1 files changed, 0 insertions(+), 148 deletions(-) diff --git a/programs/wordpad/Hu.rc b/programs/wordpad/Hu.rc index 3694062..5f5cb2f 100644 --- a/programs/wordpad/Hu.rc +++ b/programs/wordpad/Hu.rc @@ -105,151 +105,3 @@ BEGIN MENUITEM "&Paragraph..." ID_PARAFORMAT END END - -IDM_COLOR_POPUP MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "Black", ID_COLOR_BLACK - MENUITEM "Maroon", ID_COLOR_MAROON - MENUITEM "Green", ID_COLOR_GREEN - MENUITEM "Olive" ID_COLOR_OLIVE - MENUITEM "Navy" ID_COLOR_NAVY - MENUITEM "Purple" ID_COLOR_PURPLE - MENUITEM "Teal" ID_COLOR_TEAL - MENUITEM "Gray" ID_COLOR_GRAY - MENUITEM "Silver" ID_COLOR_SILVER - MENUITEM "Red" ID_COLOR_RED - MENUITEM "Lime" ID_COLOR_LIME - MENUITEM "Yellow" ID_COLOR_YELLOW - MENUITEM "Blue" ID_COLOR_BLUE - MENUITEM "Fuchsia" ID_COLOR_FUCHSIA - MENUITEM "Aqua" ID_COLOR_AQUA - MENUITEM "White" ID_COLOR_WHITE - MENUITEM "Automatic" ID_COLOR_AUTOMATIC - END -END - -IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "Date and time" -FONT 10, "MS Sans Serif" -BEGIN - LTEXT "Available formats",-1,3,2,100,15 - LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY - PUSHBUTTON "&OK",IDOK,87,12,40,12 - PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12 -END - -IDD_NEWFILE DIALOG DISCARDABLE 30, 20, 140, 80 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "New" -FONT 10, "MS Sans Serif" -BEGIN - LTEXT "New document type",-1,3,2,100,15 - LISTBOX IDC_NEWFILE,3,12,90,65,LBS_NOINTEGRALHEIGHT - PUSHBUTTON "&OK",IDOK,97,12,40,12 - PUSHBUTTON "&Cancel",IDCANCEL,97,26,40,12 -END - -IDD_PARAFORMAT DIALOG DISCARDABLE 30, 20, 200, 110 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -Caption "Paragraph format" -FONT 8, "MS Shell Dlg" -BEGIN - GROUPBOX "Indentation", -1, 10, 10, 120, 68 - LTEXT "Left", -1, 15, 22, 40, 13 - EDITTEXT IDC_PARA_LEFT, 55, 20, 60, 13 - LTEXT "Right", -1, 15, 40, 40, 13 - EDITTEXT IDC_PARA_RIGHT, 55, 38, 60, 13 - LTEXT "First line", -1, 15, 58, 40, 13 - EDITTEXT IDC_PARA_FIRST, 55, 56, 60, 13 - LTEXT "Alignment", -1, 15, 87, 40, 13 - COMBOBOX IDC_PARA_ALIGN, 55, 85, 60, 60, CBS_DROPDOWNLIST - PUSHBUTTON "&OK", IDOK, 137, 15, 50, 15 - PUSHBUTTON "&Cancel", IDCANCEL, 137, 33, 50, 15 -END - -IDD_TABSTOPS DIALOG DISCARDABLE 30, 20, 200, 110 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -Caption "Tabs" -FONT 8, "MS SHell DLg" -BEGIN - GROUPBOX "Tab stops", -1, 10, 10, 120, 90 - COMBOBOX IDC_TABSTOPS, 20, 20, 100, 60, CBS_SIMPLE - DEFPUSHBUTTON "&Add", ID_TAB_ADD, 20, 80, 45, 15 - PUSHBUTTON "&Remove", ID_TAB_DEL, 72, 80, 45, 15 - PUSHBUTTON "&OK", IDOK, 137, 15, 50, 15 - PUSHBUTTON "&Cancel", IDCANCEL, 137, 33, 50, 15 - PUSHBUTTON "Remove al&l", ID_TAB_EMPTY, 137, 51, 50, 15 -END - -IDD_FORMATOPTS DIALOG DISCARDABLE 0, 0, 280, 110 -STYLE DS_SYSMODAL -Caption "" -FONT 8, "MS Shell Dlg" -BEGIN - GROUPBOX "Line wrapping", -1, 10, 10, 130, 85 - RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 - RADIOBUTTON "Wrap text by the &window border", IDC_PAGEFMT_WW, 18, 45, 117, 15 - RADIOBUTTON "Wrap text by the &margin", IDC_PAGEFMT_WM, 18, 65, 117, 15 - GROUPBOX "Toolbars", -1, 150, 10, 120, 85 - CHECKBOX "&Toolbar", IDC_PAGEFMT_TB, 160, 20, 80, 15 - CHECKBOX "&Formatbar", IDC_PAGEFMT_FB, 160, 38, 80, 15 - CHECKBOX "&Ruler", IDC_PAGEFMT_RU, 160, 56, 80, 15 - CHECKBOX "&Statusbar", IDC_PAGEFMT_SB, 160, 74, 80, 15 - LTEXT "", IDC_PAGEFMT_ID, 0,0,0,0 -END - -STRINGTABLE DISCARDABLE -BEGIN - STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)" - STRING_TEXT_FILES_TXT, "Text documents (*.txt)" - STRING_TEXT_FILES_UNICODE_TXT, "Unicode text document (*.txt)" - STRING_ALL_FILES, "All documents (*.*)" -END - -STRINGTABLE DISCARDABLE -BEGIN - STRING_ALIGN_LEFT, "Left" - STRING_ALIGN_RIGHT, "Right" - STRING_ALIGN_CENTER, "Center" -END - -STRINGTABLE DISCARDABLE -BEGIN - STRING_NEWFILE_RICHTEXT, "Rich text document" - STRING_NEWFILE_TXT, "Text document" - STRING_NEWFILE_TXT_UNICODE, "Unicode text document" -END - -STRINGTABLE DISCARDABLE -BEGIN - STRING_PRINTER_FILES_PRN, "Printer files (*.PRN)" -END - -STRINGTABLE DISCARDABLE -BEGIN - STRING_VIEWPROPS_TITLE, "Options" - STRING_VIEWPROPS_TEXT, "Text" - STRING_VIEWPROPS_RICHTEXT, "Rich text" -END - -STRINGTABLE DISCARDABLE -BEGIN - STRING_PREVIEW_PRINT, "Print" - STRING_PREVIEW_NEXTPAGE, "Next page" - STRING_PREVIEW_PREVPAGE, "Previous page" - STRING_PREVIEW_TWOPAGES, "Two pages" - STRING_PREVIEW_ONEPAGE, "One page" - STRING_PREVIEW_ZOOMIN, "Zoom in" - STRING_PREVIEW_ZOOMOUT, "Zoom out" - STRING_PREVIEW_CLOSE, "Close" - STRING_PREVIEW_PAGE, "Page" - STRING_PREVIEW_PAGES, "Pages" -END - -STRINGTABLE DISCARDABLE -BEGIN - STRING_UNITS_CM, "cm" -END
1
0
0
0
Andrew Nguyen : setupapi: Add a few traces for SetupDecompressOrCopyFileW.
by Alexandre Julliard
16 Jun '10
16 Jun '10
Module: wine Branch: master Commit: 6456e14055584db1d67238a5e70c3bc42c881695 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6456e14055584db1d67238a5e…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue Jun 15 22:06:56 2010 -0500 setupapi: Add a few traces for SetupDecompressOrCopyFileW. --- dlls/setupapi/misc.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 6e83962..e7ccfe6 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -1474,6 +1474,8 @@ static UINT CALLBACK decompress_or_copy_callback( PVOID context, UINT notificati if (context_info->has_extracted) return FILEOP_ABORT; + TRACE("Requesting extraction of cabinet file %s\n", + wine_dbgstr_w(info->NameInCabinet)); strcpyW( info->FullTargetName, context_info->target ); context_info->has_extracted = 1; return FILEOP_DOIT; @@ -1537,10 +1539,20 @@ DWORD WINAPI SetupDecompressOrCopyFileW( PCWSTR source, PCWSTR target, PUINT typ UINT comp; DWORD ret = ERROR_INVALID_PARAMETER; + TRACE("(%s, %s, %p)\n", debugstr_w(source), debugstr_w(target), type); + if (!source || !target) return ERROR_INVALID_PARAMETER; - if (!type) comp = detect_compression_type( source ); - else comp = *type; + if (!type) + { + comp = detect_compression_type( source ); + TRACE("Detected compression type %u\n", comp); + } + else + { + comp = *type; + TRACE("Using specified compression type %u\n", comp); + } switch (comp) {
1
0
0
0
Andrew Nguyen : setupapi: Only extract the first MSZIP cabinet file in SetupDecompressOrExtractFile.
by Alexandre Julliard
16 Jun '10
16 Jun '10
Module: wine Branch: master Commit: a44506b563af5a1f852c3c26478adb75ffe01b38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a44506b563af5a1f852c3c264…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue Jun 15 22:05:36 2010 -0500 setupapi: Only extract the first MSZIP cabinet file in SetupDecompressOrExtractFile. --- dlls/setupapi/misc.c | 26 +++++++++++--------- dlls/setupapi/tests/misc.c | 54 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 13 deletions(-) diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 3343cd2..6e83962 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -1456,26 +1456,27 @@ static DWORD decompress_file_lz( LPCWSTR source, LPCWSTR target ) return ret; } +struct callback_context +{ + int has_extracted; + LPCWSTR target; +}; + static UINT CALLBACK decompress_or_copy_callback( PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2 ) { + struct callback_context *context_info = context; FILE_IN_CABINET_INFO_W *info = (FILE_IN_CABINET_INFO_W *)param1; switch (notification) { case SPFILENOTIFY_FILEINCABINET: { - LPCWSTR filename, targetname = context; - WCHAR *p; - - if ((p = strrchrW( targetname, '\\' ))) filename = p + 1; - else filename = targetname; + if (context_info->has_extracted) + return FILEOP_ABORT; - if (!lstrcmpiW( filename, info->NameInCabinet )) - { - strcpyW( info->FullTargetName, targetname ); - return FILEOP_DOIT; - } - return FILEOP_SKIP; + strcpyW( info->FullTargetName, context_info->target ); + context_info->has_extracted = 1; + return FILEOP_DOIT; } default: return NO_ERROR; } @@ -1483,9 +1484,10 @@ static UINT CALLBACK decompress_or_copy_callback( PVOID context, UINT notificati static DWORD decompress_file_cab( LPCWSTR source, LPCWSTR target ) { + struct callback_context context = {0, target}; BOOL ret; - ret = SetupIterateCabinetW( source, 0, decompress_or_copy_callback, (PVOID)target ); + ret = SetupIterateCabinetW( source, 0, decompress_or_copy_callback, &context ); if (ret) return ERROR_SUCCESS; else return GetLastError(); diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index 20f2683..f2d885d 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -361,6 +361,9 @@ static BOOL compare_file_data(LPSTR file, const BYTE *data, DWORD size) static const BYTE uncompressed[] = { 'u','n','c','o','m','p','r','e','s','s','e','d','\r','\n' }; +static const BYTE laurence[] = { + 'l','a','u','r','e','n','c','e','\r','\n' +}; static const BYTE comp_lzx[] = { 0x53, 0x5a, 0x44, 0x44, 0x88, 0xf0, 0x27, 0x33, 0x41, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x3f, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64 @@ -394,6 +397,18 @@ static const BYTE comp_cab_zip[] = { 0x00, 0x7c, 0x80, 0x26, 0x2b, 0x12, 0x00, 0x0e, 0x00, 0x43, 0x4b, 0x2b, 0xcd, 0x4b, 0xce, 0xcf, 0x2d, 0x28, 0x4a, 0x2d, 0x2e, 0x4e, 0x4d, 0xe1, 0xe5, 0x02, 0x00 }; +static const BYTE comp_cab_zip_multi[] = { + 0x4d, 0x53, 0x43, 0x46, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x38, 0xf0, 0x48, 0x20, 0x00, 0x74, 0x72, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x6d, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, + 0x38, 0xf0, 0x48, 0x20, 0x00, 0x77, 0x69, 0x6e, 0x65, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xd1, 0x38, 0xf0, 0x48, 0x20, 0x00, 0x73, 0x68, 0x61, 0x6e, 0x64, 0x79, + 0x00, 0x67, 0x2c, 0x03, 0x85, 0x23, 0x00, 0x20, 0x00, 0x43, 0x4b, 0xcb, 0x49, 0x2c, 0x2d, 0x4a, + 0xcd, 0x4b, 0x4e, 0xe5, 0xe5, 0x2a, 0xcd, 0x4b, 0xce, 0xcf, 0x2d, 0x28, 0x4a, 0x2d, 0x2e, 0x4e, + 0x4d, 0xe1, 0xe5, 0x2a, 0x2e, 0x49, 0x2d, 0xca, 0x03, 0x8a, 0x02, 0x00 +}; static void test_SetupGetFileCompressionInfo(void) { @@ -523,6 +538,23 @@ static void test_SetupDecompressOrCopyFile(void) {source, NULL, &type}, }; + const struct + { + const char *filename; + const BYTE *expected_buffer; + const size_t buffer_size; + } zip_multi_tests[] = + { + {"tristram", laurence, sizeof(laurence)}, + {"tristram.txt", laurence, sizeof(laurence)}, + {"wine", laurence, sizeof(laurence)}, + {"wine.txt", laurence, sizeof(laurence)}, + {"shandy", laurence, sizeof(laurence)}, + {"shandy.txt", laurence, sizeof(laurence)}, + {"deadbeef", laurence, sizeof(laurence)}, + {"deadbeef.txt", laurence, sizeof(laurence)}, + }; + GetTempPathA(sizeof(temp), temp); GetTempFileNameA(temp, "doc", 0, source); GetTempFileNameA(temp, "doc", 0, target); @@ -624,7 +656,27 @@ static void test_SetupDecompressOrCopyFile(void) ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); ok(compare_file_data(target, comp_cab_zip, sizeof(comp_cab_zip)), "incorrect target file\n"); - DeleteFileA(target); + /* Show that SetupDecompressOrCopyFileA simply extracts the first file it + * finds within the compressed cabinet. Contents are: + * tristram -> "laurence\r\n" + * wine -> "uncompressed\r\n" + * shandy -> "sterne\r\n" */ + + create_source_file(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); + + p = strrchr(target, '\\'); + + for (i = 0; i < sizeof(zip_multi_tests)/sizeof(zip_multi_tests[0]); i++) + { + lstrcpyA(p + 1, zip_multi_tests[i].filename); + + ret = SetupDecompressOrCopyFileA(source, target, NULL); + ok(!ret, "[%d] SetupDecompressOrCopyFile failed unexpectedly: %d\n", i, ret); + ok(compare_file_data(target, zip_multi_tests[i].expected_buffer, zip_multi_tests[i].buffer_size), + "[%d] incorrect target file\n", i); + DeleteFileA(target); + } + DeleteFileA(source); }
1
0
0
0
Andrew Nguyen : setupapi: Exhaustively test the invalid parameter handling of SetupDecompressOrCopyFileA .
by Alexandre Julliard
16 Jun '10
16 Jun '10
Module: wine Branch: master Commit: 53a563bb384548a5f93ffc34df11b26449d653a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53a563bb384548a5f93ffc34d…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue Jun 15 05:21:19 2010 -0500 setupapi: Exhaustively test the invalid parameter handling of SetupDecompressOrCopyFileA. --- dlls/setupapi/tests/misc.c | 44 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index a3abde4..20f2683 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -506,6 +506,22 @@ static void test_SetupDecompressOrCopyFile(void) DWORD ret; char source[MAX_PATH], target[MAX_PATH], temp[MAX_PATH], *p; UINT type; + int i; + + const struct + { + PCSTR source; + PCSTR target; + PUINT type; + } invalid_parameters[] = + { + {NULL, NULL, NULL}, + {NULL, NULL, &type}, + {NULL, target, NULL}, + {NULL, target, &type}, + {source, NULL, NULL}, + {source, NULL, &type}, + }; GetTempPathA(sizeof(temp), temp); GetTempFileNameA(temp, "doc", 0, source); @@ -515,15 +531,25 @@ static void test_SetupDecompressOrCopyFile(void) create_source_file(source, uncompressed, sizeof(uncompressed)); - ret = SetupDecompressOrCopyFileA(NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "SetupDecompressOrCopyFile failed unexpectedly\n"); - - type = FILE_COMPRESSION_NONE; - ret = SetupDecompressOrCopyFileA(NULL, target, &type); - ok(ret == ERROR_INVALID_PARAMETER, "SetupDecompressOrCopyFile failed unexpectedly\n"); - - ret = SetupDecompressOrCopyFileA(source, NULL, &type); - ok(ret == ERROR_INVALID_PARAMETER, "SetupDecompressOrCopyFile failed unexpectedly\n"); + for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) + { + type = FILE_COMPRESSION_NONE; + ret = SetupDecompressOrCopyFileA(invalid_parameters[i].source, + invalid_parameters[i].target, + invalid_parameters[i].type); + ok(ret == ERROR_INVALID_PARAMETER, + "[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %u\n", + i, ret); + + /* try an invalid compression type */ + type = 5; + ret = SetupDecompressOrCopyFileA(invalid_parameters[i].source, + invalid_parameters[i].target, + invalid_parameters[i].type); + ok(ret == ERROR_INVALID_PARAMETER, + "[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %u\n", + i, ret); + } type = 5; /* try an invalid compression type */ ret = SetupDecompressOrCopyFileA(source, target, &type);
1
0
0
0
Andrew Nguyen : setupapi/tests: Add simple enumeration tests for SetupIterateCabinetW.
by Alexandre Julliard
16 Jun '10
16 Jun '10
Module: wine Branch: master Commit: 813024d4923c633da5e755ff993d0e3662365a6b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=813024d4923c633da5e755ff9…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue Jun 15 05:21:07 2010 -0500 setupapi/tests: Add simple enumeration tests for SetupIterateCabinetW. --- dlls/setupapi/tests/setupcab.c | 73 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 70 insertions(+), 3 deletions(-) diff --git a/dlls/setupapi/tests/setupcab.c b/dlls/setupapi/tests/setupcab.c index 801d111..47a9ab9 100644 --- a/dlls/setupapi/tests/setupcab.c +++ b/dlls/setupapi/tests/setupcab.c @@ -42,6 +42,8 @@ static const BYTE comp_cab_zip_multi[] = { 0x4d, 0xe1, 0xe5, 0x2a, 0x2e, 0x49, 0x2d, 0xca, 0x03, 0x8a, 0x02, 0x00 }; +static const WCHAR docW[] = {'d','o','c',0}; + static void create_source_fileA(LPSTR filename, const BYTE *data, DWORD size) { HANDLE handle; @@ -150,7 +152,6 @@ static void test_invalid_parametersA(void) static void test_invalid_parametersW(void) { static const WCHAR nonexistentW[] = {'c',':','\\','n','o','n','e','x','i','s','t','e','n','t','.','c','a','b',0}; - static const WCHAR docW[] = {'d','o','c',0}; static const WCHAR emptyW[] = {0}; BOOL ret; @@ -282,8 +283,6 @@ static void test_invalid_callbackA(void) static void test_invalid_callbackW(void) { - static const WCHAR docW[] = {'d','o','c',0}; - BOOL ret; WCHAR source[MAX_PATH], temp[MAX_PATH]; @@ -373,6 +372,73 @@ static void test_simple_enumerationA(void) DeleteFileA(source); } +static const WCHAR tristramW[] = {'t','r','i','s','t','r','a','m',0}; +static const WCHAR wineW[] = {'w','i','n','e',0}; +static const WCHAR shandyW[] = {'s','h','a','n','d','y',0}; +static const WCHAR *expected_filesW[] = {tristramW, wineW, shandyW}; + +static UINT CALLBACK simple_callbackW(PVOID Context, UINT Notification, + UINT_PTR Param1, UINT_PTR Param2) +{ + static int index; + int *file_count = Context; + + switch (Notification) + { + case SPFILENOTIFY_CABINETINFO: + index = 0; + return NO_ERROR; + case SPFILENOTIFY_FILEINCABINET: + { + FILE_IN_CABINET_INFO_W *info = (FILE_IN_CABINET_INFO_W *)Param1; + + (*file_count)++; + + if (index < sizeof(expected_filesW)/sizeof(WCHAR *)) + { + ok(!lstrcmpW(expected_filesW[index], info->NameInCabinet), + "[%d] Expected file %s, got %s\n", + index, wine_dbgstr_w(expected_filesW[index]), wine_dbgstr_w(info->NameInCabinet)); + index++; + return FILEOP_SKIP; + } + else + { + ok(0, "Unexpectedly enumerated more than number of files in cabinet, index = %d\n", index); + return FILEOP_ABORT; + } + } + default: + return NO_ERROR; + } +} + +static void test_simple_enumerationW(void) +{ + BOOL ret; + WCHAR source[MAX_PATH], temp[MAX_PATH]; + int enum_count = 0; + + ret = SetupIterateCabinetW(NULL, 0, NULL, NULL); + if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("SetupIterateCabinetW is not available\n"); + return; + } + + GetTempPathW(sizeof(temp)/sizeof(WCHAR), temp); + GetTempFileNameW(temp, docW, 0, source); + + create_source_fileW(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); + + ret = SetupIterateCabinetW(source, 0, simple_callbackW, &enum_count); + ok(ret == 1, "Expected SetupIterateCabinetW to return 1, got %d\n", ret); + ok(enum_count == sizeof(expected_files)/sizeof(WCHAR *), + "Unexpectedly enumerated %d files\n", enum_count); + + DeleteFileW(source); +} + START_TEST(setupcab) { test_invalid_parametersA(); @@ -386,4 +452,5 @@ START_TEST(setupcab) } test_simple_enumerationA(); + test_simple_enumerationW(); }
1
0
0
0
Andrew Nguyen : setupapi/tests: Add tests to show that SetupIterateCabinet handles callback exceptions on newer Windows .
by Alexandre Julliard
16 Jun '10
16 Jun '10
Module: wine Branch: master Commit: abf63710da2cdca9779fbb60fa38627625b1788b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=abf63710da2cdca9779fbb60f…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue Jun 15 05:20:45 2010 -0500 setupapi/tests: Add tests to show that SetupIterateCabinet handles callback exceptions on newer Windows. --- dlls/setupapi/tests/setupcab.c | 97 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 97 insertions(+), 0 deletions(-) diff --git a/dlls/setupapi/tests/setupcab.c b/dlls/setupapi/tests/setupcab.c index 3c126c9..8a4dc9e 100644 --- a/dlls/setupapi/tests/setupcab.c +++ b/dlls/setupapi/tests/setupcab.c @@ -29,6 +29,19 @@ #include "setupapi.h" #include "wine/test.h" +static const BYTE comp_cab_zip_multi[] = { + 0x4d, 0x53, 0x43, 0x46, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x38, 0xf0, 0x48, 0x20, 0x00, 0x74, 0x72, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x6d, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, + 0x38, 0xf0, 0x48, 0x20, 0x00, 0x77, 0x69, 0x6e, 0x65, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xd1, 0x38, 0xf0, 0x48, 0x20, 0x00, 0x73, 0x68, 0x61, 0x6e, 0x64, 0x79, + 0x00, 0x67, 0x2c, 0x03, 0x85, 0x23, 0x00, 0x20, 0x00, 0x43, 0x4b, 0xcb, 0x49, 0x2c, 0x2d, 0x4a, + 0xcd, 0x4b, 0x4e, 0xe5, 0xe5, 0x2a, 0xcd, 0x4b, 0xce, 0xcf, 0x2d, 0x28, 0x4a, 0x2d, 0x2e, 0x4e, + 0x4d, 0xe1, 0xe5, 0x2a, 0x2e, 0x49, 0x2d, 0xca, 0x03, 0x8a, 0x02, 0x00 +}; + static void create_source_fileA(LPSTR filename, const BYTE *data, DWORD size) { HANDLE handle; @@ -226,8 +239,92 @@ static void test_invalid_parametersW(void) DeleteFileW(source); } +static UINT CALLBACK crash_callbackA(PVOID Context, UINT Notification, + UINT_PTR Param1, UINT_PTR Param2) +{ + *(volatile char*)0 = 2; + return 0; +} + +static UINT CALLBACK crash_callbackW(PVOID Context, UINT Notification, + UINT_PTR Param1, UINT_PTR Param2) +{ + *(volatile char*)0 = 2; + return 0; +} + +static void test_invalid_callbackA(void) +{ + BOOL ret; + char source[MAX_PATH], temp[MAX_PATH]; + + GetTempPathA(sizeof(temp), temp); + GetTempFileNameA(temp, "doc", 0, source); + + create_source_fileA(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); + + SetLastError(0xdeadbeef); + ret = SetupIterateCabinetA(source, 0, NULL, NULL); + ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); + ok(GetLastError() == ERROR_INVALID_DATA, + "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", + GetLastError()); + + SetLastError(0xdeadbeef); + ret = SetupIterateCabinetA(source, 0, crash_callbackA, NULL); + ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); + ok(GetLastError() == ERROR_INVALID_DATA, + "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", + GetLastError()); + + DeleteFileA(source); +} + +static void test_invalid_callbackW(void) +{ + static const WCHAR docW[] = {'d','o','c',0}; + + BOOL ret; + WCHAR source[MAX_PATH], temp[MAX_PATH]; + + ret = SetupIterateCabinetW(NULL, 0, NULL, NULL); + if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("SetupIterateCabinetW is not available\n"); + return; + } + + GetTempPathW(sizeof(temp)/sizeof(WCHAR), temp); + GetTempFileNameW(temp, docW, 0, source); + + create_source_fileW(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); + + SetLastError(0xdeadbeef); + ret = SetupIterateCabinetW(source, 0, NULL, NULL); + ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); + ok(GetLastError() == ERROR_INVALID_DATA, + "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", + GetLastError()); + + SetLastError(0xdeadbeef); + ret = SetupIterateCabinetW(source, 0, crash_callbackW, NULL); + ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); + ok(GetLastError() == ERROR_INVALID_DATA, + "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", + GetLastError()); + + DeleteFileW(source); +} + START_TEST(setupcab) { test_invalid_parametersA(); test_invalid_parametersW(); + + /* Tests crash on NT4/Win9x/Win2k and Wine. */ + if (0) + { + test_invalid_callbackA(); + test_invalid_callbackW(); + } }
1
0
0
0
Andrew Nguyen : setupapi/tests: Add simple enumeration tests for SetupIterateCabinetA.
by Alexandre Julliard
16 Jun '10
16 Jun '10
Module: wine Branch: master Commit: d0e93cd3ab9955c9b61a8e61498f0c769d829184 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0e93cd3ab9955c9b61a8e614…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue Jun 15 05:20:57 2010 -0500 setupapi/tests: Add simple enumeration tests for SetupIterateCabinetA. --- dlls/setupapi/tests/setupcab.c | 59 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) diff --git a/dlls/setupapi/tests/setupcab.c b/dlls/setupapi/tests/setupcab.c index 8a4dc9e..801d111 100644 --- a/dlls/setupapi/tests/setupcab.c +++ b/dlls/setupapi/tests/setupcab.c @@ -316,6 +316,63 @@ static void test_invalid_callbackW(void) DeleteFileW(source); } +static const char *expected_files[] = {"tristram", "wine", "shandy"}; + +static UINT CALLBACK simple_callbackA(PVOID Context, UINT Notification, + UINT_PTR Param1, UINT_PTR Param2) +{ + static int index; + int *file_count = Context; + + switch (Notification) + { + case SPFILENOTIFY_CABINETINFO: + index = 0; + return NO_ERROR; + case SPFILENOTIFY_FILEINCABINET: + { + FILE_IN_CABINET_INFO_A *info = (FILE_IN_CABINET_INFO_A *)Param1; + + (*file_count)++; + + if (index < sizeof(expected_files)/sizeof(char *)) + { + ok(!strcmp(expected_files[index], info->NameInCabinet), + "[%d] Expected file \"%s\", got \"%s\"\n", + index, expected_files[index], info->NameInCabinet); + index++; + return FILEOP_SKIP; + } + else + { + ok(0, "Unexpectedly enumerated more than number of files in cabinet, index = %d\n", index); + return FILEOP_ABORT; + } + } + default: + return NO_ERROR; + } +} + +static void test_simple_enumerationA(void) +{ + BOOL ret; + char source[MAX_PATH], temp[MAX_PATH]; + int enum_count = 0; + + GetTempPathA(sizeof(temp), temp); + GetTempFileNameA(temp, "doc", 0, source); + + create_source_fileA(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); + + ret = SetupIterateCabinetA(source, 0, simple_callbackA, &enum_count); + ok(ret == 1, "Expected SetupIterateCabinetA to return 1, got %d\n", ret); + ok(enum_count == sizeof(expected_files)/sizeof(char *), + "Unexpectedly enumerated %d files\n", enum_count); + + DeleteFileA(source); +} + START_TEST(setupcab) { test_invalid_parametersA(); @@ -327,4 +384,6 @@ START_TEST(setupcab) test_invalid_callbackA(); test_invalid_callbackW(); } + + test_simple_enumerationA(); }
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
67
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
Results per page:
10
25
50
100
200