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 2007
----- 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
5 participants
856 discussions
Start a n
N
ew thread
Dmitry Timoshkov : user32: Do not hardcode cp1252 for an icon/title font.
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: 7d482d8e7eee0ddeba59b7006be2f041bf77d50a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d482d8e7eee0ddeba59b7006…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun Jun 10 18:14:56 2007 +0900 user32: Do not hardcode cp1252 for an icon/title font. --- dlls/user32/sysparams.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index f8feb0d..c5de419 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -314,7 +314,7 @@ static ICONMETRICSW icon_metrics = 75, /* iHorzSpacing */ 75, /* iVertSpacing */ TRUE, /* iTitleWrap */ - { -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, + { -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH } /* lfFont */ };
1
0
0
0
Jeff Latimer : msi: Use the langbuff len rather than the versionbuff len when allocating the langbuff .
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: 8521cb867744b9c5ef484c808793f95aa8bb2abb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8521cb867744b9c5ef484c808…
Author: Jeff Latimer <lats(a)yless4u.com.au> Date: Sun Jun 10 17:43:30 2007 +1000 msi: Use the langbuff len rather than the versionbuff len when allocating the langbuff. --- dlls/msi/msi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 927c47f..a09984e 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -1206,7 +1206,7 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf, if( lpLangBuf && pcchLangBuf && *pcchLangBuf ) { - lpwLangBuff = msi_alloc(*pcchVersionBuf*sizeof(WCHAR)); + lpwLangBuff = msi_alloc(*pcchLangBuf*sizeof(WCHAR)); if( !lpwLangBuff ) goto end; }
1
0
0
0
Jeff Latimer : shell32: Fix possible dereference of NULL ptr.
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: f16e2c3a27a1e9bf15c376a8b6a484b3fa18cc10 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f16e2c3a27a1e9bf15c376a8b…
Author: Jeff Latimer <lats(a)yless4u.com.au> Date: Sun Jun 10 17:42:50 2007 +1000 shell32: Fix possible dereference of NULL ptr. --- dlls/shell32/shelllink.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 0b7094a..aa21a4a 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -584,8 +584,12 @@ static HRESULT Stream_LoadString( IStream* stm, BOOL unicode, LPWSTR *pstr ) { count = MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, NULL, 0 ); str = HeapAlloc( GetProcessHeap(), 0, (count+1)*sizeof (WCHAR) ); - if( str ) - MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, str, count ); + if( !str ) + { + HeapFree( GetProcessHeap(), 0, temp ); + return E_OUTOFMEMORY; + } + MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, str, count ); HeapFree( GetProcessHeap(), 0, temp ); } else
1
0
0
0
Misha Koshelev : shell32/tests: Add test for unquoted %1 in command and ddeexec keys.
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: 0678f6d16894b377607a50d57a69753f635fc33b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0678f6d16894b377607a50d57…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Sat Jun 9 00:25:21 2007 -0500 shell32/tests: Add test for unquoted %1 in command and ddeexec keys. --- dlls/shell32/tests/shlexec.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 0b65066..7fc34fb 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1062,6 +1062,10 @@ static dde_tests_t dde_tests[] = {"", "[open(\"%1\")]", "shlexec", "dde", NULL, FALSE, "[open(\"%s\")]", 0x0, 33}, {"\"%1\"", "[open(\"%1\")]", "shlexec", "dde", NULL, TRUE, "[open(\"%s\")]", 0x0, 33}, + /* Test unquoted %1 in command and ddeexec + * (test filename has space) */ + {"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", 0xa, 33}, + /* Test ifexec precedence over ddeexec */ {"", "[open(\"%1\")]", "shlexec", "dde", "[ifexec(\"%1\")]", FALSE, "[ifexec(\"%s\")]", 0x0, 33},
1
0
0
0
Misha Koshelev : shell32/tests: Allow testing for arbitrary number of command line arguments in DDE tests.
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: b43cac0b049b4983efdb4ee9352a398a9743b9d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b43cac0b049b4983efdb4ee93…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Sat Jun 9 00:25:17 2007 -0500 shell32/tests: Allow testing for arbitrary number of command line arguments in DDE tests. --- dlls/shell32/tests/shlexec.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 4f0aa8c..0b65066 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1044,7 +1044,7 @@ typedef struct const char* application; const char* topic; const char* ifexec; - BOOL bExpectCmdLine; + int expectedArgs; const char* expectedDdeExec; int todo; int rc; @@ -1071,7 +1071,7 @@ static dde_tests_t dde_tests[] = /* Test default DDE application */ {"", "[open(\"%1\")]", NULL, "dde", NULL, FALSE, "[open(\"%s\")]", 0x0, 33}, - {NULL, NULL, NULL, NULL, 0x0, 0} + {NULL, NULL, NULL, NULL, NULL, 0, 0x0, 0} }; static DWORD ddeInst; @@ -1191,13 +1191,13 @@ static void test_dde(void) { if ((test->todo & 0x2)==0) { - okChildInt("argcA", test->bExpectCmdLine ? 4 : 3); + okChildInt("argcA", test->expectedArgs + 3); } else todo_wine { - okChildInt("argcA", test->bExpectCmdLine ? 4 : 3); + okChildInt("argcA", test->expectedArgs + 3); } - if (test->bExpectCmdLine) + if (test->expectedArgs == 1) { if ((test->todo & 0x4) == 0) {
1
0
0
0
Misha Koshelev : shell32/tests: Expand default DDE application name tests to conform to win98.
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: ca6387b32993715ee0cfd0fa5ab24c0ee3a1d83d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca6387b32993715ee0cfd0fa5…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Sat Jun 9 00:25:13 2007 -0500 shell32/tests: Expand default DDE application name tests to conform to win98. --- dlls/shell32/tests/shlexec.c | 74 +++++++++++++++++++++++++++--------------- 1 files changed, 48 insertions(+), 26 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 621ec86..4f0aa8c 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1232,50 +1232,55 @@ static void test_dde(void) assert(DdeUninitialize(ddeInst)); } +#define DDE_DEFAULT_APP_VARIANTS 2 typedef struct { const char* command; - const char* expectedDdeApplication; + const char* expectedDdeApplication[DDE_DEFAULT_APP_VARIANTS]; int todo; - int rc; + int rc[DDE_DEFAULT_APP_VARIANTS]; } dde_default_app_tests_t; static dde_default_app_tests_t dde_default_app_tests[] = { + /* Windows XP and 98 handle default DDE app names in different ways. + * The application name we see in the first test determines the pattern + * of application names and return codes we will look for. */ + /* Test unquoted existing filename with a space */ - {"%s\\test file.exe", "test file", 0x0, 33}, - {"%s\\test file.exe param", "test file", 0x0, 33}, + {"%s\\test file.exe", {"test file", "test"}, 0x0, {33, 33}}, + {"%s\\test file.exe param", {"test file", "test"}, 0x0, {33, 33}}, /* Test quoted existing filename with a space */ - {"\"%s\\test file.exe\"", "test file", 0x0, 33}, - {"\"%s\\test file.exe\" param", "test file", 0x0, 33}, + {"\"%s\\test file.exe\"", {"test file", "test file"}, 0x0, {33, 33}}, + {"\"%s\\test file.exe\" param", {"test file", "test file"}, 0x0, {33, 33}}, /* Test unquoted filename with a space that doesn't exist, but * test2.exe does */ - {"%s\\test2 file.exe", "test2", 0x0, 33}, - {"%s\\test2 file.exe param", "test2", 0x0, 33}, + {"%s\\test2 file.exe", {"test2", "test2"}, 0x0, {33, 33}}, + {"%s\\test2 file.exe param", {"test2", "test2"}, 0x0, {33, 33}}, /* Test quoted filename with a space that does not exist */ - {"\"%s\\test2 file.exe\"", "", 0x0, 5}, - {"\"%s\\test2 file.exe\" param", "", 0x0, 5}, + {"\"%s\\test2 file.exe\"", {"", "test2 file"}, 0x0, {5, 33}}, + {"\"%s\\test2 file.exe\" param", {"", "test2 file"}, 0x0, {5, 33}}, /* Test filename supplied without the extension */ - {"%s\\test2", "test2", 0x0, 33}, - {"%s\\test2 param", "test2", 0x0, 33}, + {"%s\\test2", {"test2", "test2"}, 0x0, {33, 33}}, + {"%s\\test2 param", {"test2", "test2"}, 0x0, {33, 33}}, /* Test an unquoted nonexistent filename */ - {"%s\\notexist.exe", "", 0x0, 5}, - {"%s\\notexist.exe param", "", 0x0, 5}, + {"%s\\notexist.exe", {"", "notexist"}, 0x0, {5, 33}}, + {"%s\\notexist.exe param", {"", "notexist"}, 0x0, {5, 33}}, /* Test an application that will be found on the path */ - {"cmd", "cmd", 0x0, 33}, - {"cmd param", "cmd", 0x0, 33}, + {"cmd", {"cmd", "cmd"}, 0x0, {33, 33}}, + {"cmd param", {"cmd", "cmd"}, 0x0, {33, 33}}, /* Test an application that will not be found on the path */ - {"xyzwxyzwxyz", "", 0x0, 5}, - {"xyzwxyzwxyz param", "", 0x0, 5}, + {"xyzwxyzwxyz", {"", "xyzwxyzwxyz"}, 0x0, {5, 33}}, + {"xyzwxyzwxyz param", {"", "xyzwxyzwxyz"}, 0x0, {5, 33}}, - {NULL, NULL, 0, 0} + {NULL, {NULL}, 0, {0}} }; static void test_dde_default_app(void) @@ -1287,7 +1292,7 @@ static void test_dde_default_app(void) char params[1024]; DWORD threadId; MSG msg; - int rc; + int rc, which = 0; ddeInst = 0; rc = DdeInitializeA(&ddeInst, ddeCb, CBF_SKIP_ALLNOTIFICATIONS | CBF_FAIL_ADVISES | @@ -1321,29 +1326,46 @@ static void test_dde_default_app(void) assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, &threadId)); while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg); rc = msg.wParam > 32 ? 33 : msg.wParam; + + /* First test, find which set of test data we expect to see */ + if (test == dde_default_app_tests) + { + int i; + for (i=0; i<DDE_DEFAULT_APP_VARIANTS; i++) + { + if (!strcmp(ddeApplication, test->expectedDdeApplication[i])) + { + which = i; + break; + } + } + if (i == DDE_DEFAULT_APP_VARIANTS) + skip("Default DDE application test does not match any available results, using first expected data set.\n"); + } + if ((test->todo & 0x1)==0) { - ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call, + ok(rc==test->rc[which], "%s failed: rc=%d err=%d\n", shell_call, rc, GetLastError()); } else todo_wine { - ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call, + ok(rc==test->rc[which], "%s failed: rc=%d err=%d\n", shell_call, rc, GetLastError()); } if (rc == 33) { if ((test->todo & 0x2)==0) { - ok(!strcmp(ddeApplication, test->expectedDdeApplication), + ok(!strcmp(ddeApplication, test->expectedDdeApplication[which]), "Expected application '%s', got '%s'\n", - test->expectedDdeApplication, ddeApplication); + test->expectedDdeApplication[which], ddeApplication); } else todo_wine { - ok(!strcmp(ddeApplication, test->expectedDdeApplication), + ok(!strcmp(ddeApplication, test->expectedDdeApplication[which]), "Expected application '%s', got '%s'\n", - test->expectedDdeApplication, ddeApplication); + test->expectedDdeApplication[which], ddeApplication); } }
1
0
0
0
Misha Koshelev : shell32/tests: Use ShellExecuteEx with SEE_MASK_FLAG_DDEWAIT and SEE_MASK_FLAG_NO_UI for DDE tests .
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: 12297d64efae194f0a4ccc2f660490104b197377 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=12297d64efae194f0a4ccc2f6…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Sat Jun 9 00:22:44 2007 -0500 shell32/tests: Use ShellExecuteEx with SEE_MASK_FLAG_DDEWAIT and SEE_MASK_FLAG_NO_UI for DDE tests. --- dlls/shell32/tests/shlexec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index e525ee2..621ec86 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1128,7 +1128,7 @@ static DWORD CALLBACK ddeThread(LPVOID arg) assert(info && info->filename); PostThreadMessage(info->threadIdParent, WM_QUIT, - shell_execute(NULL, info->filename, NULL, NULL), + shell_execute_ex(SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI, NULL, info->filename, NULL, NULL), 0L); ExitThread(0); }
1
0
0
0
Misha Koshelev : shell32/tests: Save threadid from CreateThread as required by winme/98/95.
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: ee3147f434fa0142aa3eb390ee98735815647b61 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee3147f434fa0142aa3eb390e…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Sat Jun 9 00:20:56 2007 -0500 shell32/tests: Save threadid from CreateThread as required by winme/98/95. --- dlls/shell32/tests/shlexec.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index b2c62c5..e525ee2 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1144,6 +1144,7 @@ static void test_dde(void) dde_thread_info_t info = { filename, GetCurrentThreadId() }; const dde_tests_t* test; char params[1024]; + DWORD threadId; MSG msg; int rc; @@ -1173,7 +1174,7 @@ static void test_dde(void) denyNextConnection = TRUE; ddeExec[0] = 0; - assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, NULL)); + assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, &threadId)); while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg); rc = msg.wParam > 32 ? 33 : msg.wParam; if ((test->todo & 0x1)==0) @@ -1284,6 +1285,7 @@ static void test_dde_default_app(void) dde_thread_info_t info = { filename, GetCurrentThreadId() }; const dde_default_app_tests_t* test; char params[1024]; + DWORD threadId; MSG msg; int rc; @@ -1316,7 +1318,7 @@ static void test_dde_default_app(void) * so don't wait for it */ SetEvent(hEvent); - assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, NULL)); + assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, &threadId)); while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg); rc = msg.wParam > 32 ? 33 : msg.wParam; if ((test->todo & 0x1)==0)
1
0
0
0
Misha Koshelev : shell32/tests: Simplify DDE thread and message loop.
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: 37deec748d6ecebe415b4c1082bcfcfae14499e0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37deec748d6ecebe415b4c108…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Sat Jun 9 00:20:51 2007 -0500 shell32/tests: Simplify DDE thread and message loop. --- dlls/shell32/tests/shlexec.c | 46 ++++++++++------------------------------- 1 files changed, 11 insertions(+), 35 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 311867c..b2c62c5 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1125,12 +1125,12 @@ typedef struct static DWORD CALLBACK ddeThread(LPVOID arg) { dde_thread_info_t *info = (dde_thread_info_t *)arg; - int rc; - assert(info && info->filename); - rc=shell_execute(NULL, info->filename, NULL, NULL); - PostThreadMessage(info->threadIdParent, WM_QUIT, 0, 0L); - ExitThread(rc); + PostThreadMessage(info->threadIdParent, + WM_QUIT, + shell_execute(NULL, info->filename, NULL, NULL), + 0L); + ExitThread(0); } /* ShellExecute won't successfully send DDE commands to console applications after starting them, @@ -1144,7 +1144,6 @@ static void test_dde(void) dde_thread_info_t info = { filename, GetCurrentThreadId() }; const dde_tests_t* test; char params[1024]; - HANDLE hThread; MSG msg; int rc; @@ -1174,20 +1173,9 @@ static void test_dde(void) denyNextConnection = TRUE; ddeExec[0] = 0; - hThread = CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, NULL); - assert(hThread); - while (GetMessage(&msg, NULL, 0, 0)) - { - /* Need a message loop for DDE server */ - TranslateMessage(&msg); - DispatchMessage(&msg); - } - rc = WaitForSingleObject(hThread, 5000); - assert(rc == WAIT_OBJECT_0); - - GetExitCodeThread(hThread, (DWORD *)&rc); - if (rc > 32) - rc=33; + assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, NULL)); + while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg); + rc = msg.wParam > 32 ? 33 : msg.wParam; if ((test->todo & 0x1)==0) { ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call, @@ -1296,7 +1284,6 @@ static void test_dde_default_app(void) dde_thread_info_t info = { filename, GetCurrentThreadId() }; const dde_default_app_tests_t* test; char params[1024]; - HANDLE hThread; MSG msg; int rc; @@ -1329,20 +1316,9 @@ static void test_dde_default_app(void) * so don't wait for it */ SetEvent(hEvent); - hThread = CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, NULL); - assert(hThread); - while (GetMessage(&msg, NULL, 0, 0)) - { - /* Need a message loop for DDE server */ - TranslateMessage(&msg); - DispatchMessage(&msg); - } - rc = WaitForSingleObject(hThread, 5000); - assert(rc == WAIT_OBJECT_0); - - GetExitCodeThread(hThread, (DWORD *)&rc); - if (rc > 32) - rc=33; + assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, NULL)); + while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg); + rc = msg.wParam > 32 ? 33 : msg.wParam; if ((test->todo & 0x1)==0) { ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call,
1
0
0
0
Nigel Liang : shell32: Conformance tests for unicode filenames and fix a bug for file deletion.
by Alexandre Julliard
11 Jun '07
11 Jun '07
Module: wine Branch: master Commit: 1fc0cb75eebeb011a1f620fb96f32245d886916c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fc0cb75eebeb011a1f620fb9…
Author: Nigel Liang <ncliang(a)gmail.com> Date: Fri Jun 8 14:25:24 2007 -0700 shell32: Conformance tests for unicode filenames and fix a bug for file deletion. --- dlls/shell32/tests/shlfileop.c | 88 ++++++++++++++++++++++++++++++++++++++++ dlls/shell32/xdg.c | 4 +- 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 1f2f0f7..7c5354b 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -33,14 +33,19 @@ #endif static CHAR CURR_DIR[MAX_PATH]; +static const WCHAR UNICODE_PATH[] = {'c',':','\\',0x00c4,'\0','\0'}; + /* "c:\Ä", or "c:\A" with diaeresis */ + /* Double-null termination needed for pFrom field of SHFILEOPSTRUCT */ static HMODULE hshell32; static int (WINAPI *pSHCreateDirectoryExA)(HWND, LPCSTR, LPSECURITY_ATTRIBUTES); +static int (WINAPI *pSHCreateDirectoryExW)(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES); static void InitFunctionPointers(void) { hshell32 = GetModuleHandleA("shell32.dll"); pSHCreateDirectoryExA = (void*)GetProcAddress(hshell32, "SHCreateDirectoryExA"); + pSHCreateDirectoryExW = (void*)GetProcAddress(hshell32, "SHCreateDirectoryExW"); } /* creates a file with the specified name for tests */ @@ -56,11 +61,25 @@ static void createTestFile(const CHAR *name) CloseHandle(file); } +static void createTestFileW(const WCHAR *name) +{ + HANDLE file; + + file = CreateFileW(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "Failure to open file\n"); + CloseHandle(file); +} + static BOOL file_exists(const CHAR *name) { return GetFileAttributesA(name) != INVALID_FILE_ATTRIBUTES; } +static BOOL file_existsW(LPCWSTR name) +{ + return GetFileAttributesW(name) != INVALID_FILE_ATTRIBUTES; +} + static BOOL file_has_content(const CHAR *name, const CHAR *content) { CHAR buf[MAX_PATH]; @@ -983,6 +1002,73 @@ static void test_sh_create_dir(void) ok(file_exists("c:\\testdir3"), "The directory is not created\n"); } +static void test_unicode(void) +{ + SHFILEOPSTRUCTW shfoW; + int ret; + HANDLE file; + + shfoW.hwnd = NULL; + shfoW.wFunc = FO_DELETE; + shfoW.pFrom = UNICODE_PATH; + shfoW.pTo = '\0'; + shfoW.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; + shfoW.hNameMappings = NULL; + shfoW.lpszProgressTitle = NULL; + + /* Clean up before start test */ + DeleteFileW(UNICODE_PATH); + RemoveDirectoryW(UNICODE_PATH); + + /* Make sure we are on a system that supports unicode */ + SetLastError(0xdeadbeef); + file = CreateFileW(UNICODE_PATH, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + { + skip("Unicode tests skipped on non-unicode system\n"); + return; + } + CloseHandle(file); + + /* Try to delete a file with unicode filename */ + ok(file_existsW(UNICODE_PATH), "The file does not exist\n"); + ret = SHFileOperationW(&shfoW); + ok(!ret, "File is not removed, ErrorCode: %d\n", ret); + ok(!file_existsW(UNICODE_PATH), "The file should have been removed\n"); + + /* Try to trash a file with unicode filename */ + createTestFileW(UNICODE_PATH); + shfoW.fFlags |= FOF_ALLOWUNDO; + ok(file_existsW(UNICODE_PATH), "The file does not exist\n"); + ret = SHFileOperationW(&shfoW); + ok(!ret, "File is not removed, ErrorCode: %d\n", ret); + ok(!file_existsW(UNICODE_PATH), "The file should have been removed\n"); + + if(!pSHCreateDirectoryExW) + { + skip("Skipping SHCreateDirectoryExW tests\n"); + return; + } + + /* Try to delete a directory with unicode filename */ + ret = pSHCreateDirectoryExW(NULL, UNICODE_PATH, NULL); + ok(!ret, "SHCreateDirectoryExW returned %d\n", ret); + ok(file_existsW(UNICODE_PATH), "The directory is not created\n"); + shfoW.fFlags &= ~FOF_ALLOWUNDO; + ret = SHFileOperationW(&shfoW); + ok(!ret, "Directory is not removed, ErrorCode: %d\n", ret); + ok(!file_existsW(UNICODE_PATH), "The directory should have been removed\n"); + + /* Try to trash a directory with unicode filename */ + ret = pSHCreateDirectoryExW(NULL, UNICODE_PATH, NULL); + ok(!ret, "SHCreateDirectoryExW returned %d\n", ret); + ok(file_existsW(UNICODE_PATH), "The directory was not created\n"); + shfoW.fFlags |= FOF_ALLOWUNDO; + ret = SHFileOperationW(&shfoW); + ok(!ret, "Directory is not removed, ErrorCode: %d\n", ret); + ok(!file_existsW(UNICODE_PATH), "The directory should have been removed\n"); +} + START_TEST(shlfileop) { InitFunctionPointers(); @@ -1011,4 +1097,6 @@ START_TEST(shlfileop) test_sh_create_dir(); clean_after_shfo_tests(); + + test_unicode(); } diff --git a/dlls/shell32/xdg.c b/dlls/shell32/xdg.c index a3d6010..6521232 100644 --- a/dlls/shell32/xdg.c +++ b/dlls/shell32/xdg.c @@ -376,8 +376,8 @@ static int url_encode(const char *value, char *output) if (output) { *(output++) = '%'; - *(output++) = hexchars[(unsigned)(*c)/16]; - *(output++) = hexchars[(unsigned)(*c)%16]; + *(output++) = hexchars[(unsigned char)*c / 16]; + *(output++) = hexchars[(unsigned char)*c % 16]; } num_written += 3; }
1
0
0
0
← Newer
1
...
59
60
61
62
63
64
65
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200