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
March
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
September 2009
----- 2025 -----
March 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
866 discussions
Start a n
N
ew thread
Ričardas Barkauskas : d3dx9_42: Implement d3dx9_42 and forward the functions to d3dx9_36.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: 5ae2ff8dafa54cb237a84e627dd84aab5924809b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ae2ff8dafa54cb237a84e627…
Author: Ričardas Barkauskas <miegalius(a)gmail.com> Date: Fri Sep 25 12:17:20 2009 +0300 d3dx9_42: Implement d3dx9_42 and forward the functions to d3dx9_36. --- configure | 9 + configure.ac | 1 + dlls/d3dx9_42/Makefile.in | 15 ++ dlls/d3dx9_42/d3dx9_42.spec | 336 +++++++++++++++++++++++++++++++++++++++++ dlls/d3dx9_42/d3dx9_42_main.c | 64 ++++++++ dlls/d3dx9_42/version.rc | 28 ++++ 6 files changed, 453 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5ae2ff8dafa54cb237a84…
1
0
0
0
Alexandre Julliard : shell32: Don' t try to call a 16-bit function on non-x86 platforms.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: e55acdb642c544e0622887ef3f03f67c86f10acf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e55acdb642c544e0622887ef3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Sep 25 14:37:57 2009 +0200 shell32: Don't try to call a 16-bit function on non-x86 platforms. --- dlls/shell32/control.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/control.c b/dlls/shell32/control.c index 9b566b6..cfea201 100644 --- a/dlls/shell32/control.c +++ b/dlls/shell32/control.c @@ -886,6 +886,7 @@ HRESULT WINAPI Control_FillCache_RunDLLA(HWND hWnd, HANDLE hModule, DWORD w, DWO void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst, LPCSTR cmdline, INT cmdshow ) { +#ifdef __i386__ WORD args[5]; SEGPTR cmdline_seg; @@ -900,6 +901,7 @@ void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst, args[0] = cmdshow; WOWCallback16Ex( proc, WCB16_PASCAL, sizeof(args), args, NULL ); UnMapLS( cmdline_seg ); +#endif } /*************************************************************************
1
0
0
0
Aric Stewart : shell32: Stub ShellHookProc.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: 42e54f9513340e3d1d267ab627924148be81b68f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=42e54f9513340e3d1d267ab62…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu Sep 24 13:54:33 2009 -0500 shell32: Stub ShellHookProc. --- dlls/shell32/shell32.spec | 2 +- dlls/shell32/shell32_main.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec index 2eb5934..546e6a5 100644 --- a/dlls/shell32/shell32.spec +++ b/dlls/shell32/shell32.spec @@ -408,7 +408,7 @@ @ stdcall ShellExecuteExA (long) @ stdcall ShellExecuteExW (long) @ stdcall ShellExecuteW (long wstr wstr wstr wstr long) -@ stub ShellHookProc +@ stdcall ShellHookProc(long long long) @ stdcall Shell_NotifyIcon(long ptr) Shell_NotifyIconA @ stdcall Shell_NotifyIconA(long ptr) @ stdcall Shell_NotifyIconW(long ptr) diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index f3f8725..2334e62 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -1220,3 +1220,12 @@ BOOL WINAPI InitNetworkAddressControl(void) FIXME("stub\n"); return FALSE; } + +/*********************************************************************** + * ShellHookProc (SHELL32.@) + */ +LRESULT CALLBACK ShellHookProc(DWORD a, DWORD b, DWORD c) +{ + FIXME("Stub\n"); + return 0; +}
1
0
0
0
Dan Kegel : cmd: Make 'dir' hide hidden or system files by default.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: 25efe69d60d98d8b57a1c3ba496bef7414fab106 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25efe69d60d98d8b57a1c3ba4…
Author: Dan Kegel <dank(a)kegel.com> Date: Thu Sep 24 10:52:57 2009 -0700 cmd: Make 'dir' hide hidden or system files by default. --- programs/cmd/directory.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index 647f4f1..08c72ae 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -680,7 +680,7 @@ void WCMD_directory (WCHAR *cmd) { orderGroupDirs = FALSE; orderGroupDirsReverse = FALSE; showattrs = 0; - attrsbits = 0; + attrsbits = FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM; /* Handle args - Loop through so right most is the effective one */ /* Note: /- appears to be a negate rather than an off, eg. dir
1
0
0
0
Dan Kegel : cmd: Improve 'attrib' builtin to handle at least setting/ clearing single attributes.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: 81e5c76a5fe16d841bbfaad7118df095d1daddbd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81e5c76a5fe16d841bbfaad71…
Author: Dan Kegel <dank(a)kegel.com> Date: Thu Sep 24 10:52:36 2009 -0700 cmd: Improve 'attrib' builtin to handle at least setting/clearing single attributes. --- programs/cmd/builtins.c | 49 +++++++++++++++++++++++++++++++--------------- 1 files changed, 33 insertions(+), 16 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 612e5d9..f5dfbf0 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1775,12 +1775,6 @@ void WCMD_endlocal (void) { * * Display and optionally sets DOS attributes on a file or directory * - * FIXME: Wine currently uses the Unix stat() function to get file attributes. - * As a result only the Readonly flag is correctly reported, the Archive bit - * is always set and the rest are not implemented. We do the Right Thing anyway. - * - * FIXME: No SET functionality. - * */ void WCMD_setshow_attrib (void) { @@ -1789,26 +1783,49 @@ void WCMD_setshow_attrib (void) { HANDLE hff; WIN32_FIND_DATA fd; WCHAR flags[9] = {' ',' ',' ',' ',' ',' ',' ',' ','\0'}; - - if (param1[0] == '-') { - WCMD_output (WCMD_LoadMessage(WCMD_NYI)); - return; + WCHAR *name = param1; + DWORD attrib_set=0; + DWORD attrib_clear=0; + + if (param1[0] == '+' || param1[0] == '-') { + DWORD attrib = 0; + /* FIXME: the real cmd can handle many more than two args; this should be in a loop */ + switch (param1[1]) { + case 'H': case 'h': attrib |= FILE_ATTRIBUTE_HIDDEN; break; + case 'S': case 's': attrib |= FILE_ATTRIBUTE_SYSTEM; break; + case 'R': case 'r': attrib |= FILE_ATTRIBUTE_READONLY; break; + case 'A': case 'a': attrib |= FILE_ATTRIBUTE_ARCHIVE; break; + default: + WCMD_output (WCMD_LoadMessage(WCMD_NYI)); + return; + } + switch (param1[0]) { + case '+': attrib_set = attrib; break; + case '-': attrib_clear = attrib; break; + } + name = param2; } - if (strlenW(param1) == 0) { + if (strlenW(name) == 0) { static const WCHAR slashStarW[] = {'\\','*','\0'}; - GetCurrentDirectory (sizeof(param1)/sizeof(WCHAR), param1); - strcatW (param1, slashStarW); + GetCurrentDirectory (sizeof(param2)/sizeof(WCHAR), name); + strcatW (name, slashStarW); } - hff = FindFirstFile (param1, &fd); + hff = FindFirstFile (name, &fd); if (hff == INVALID_HANDLE_VALUE) { - WCMD_output (WCMD_LoadMessage(WCMD_FILENOTFOUND), param1); + WCMD_output (WCMD_LoadMessage(WCMD_FILENOTFOUND), name); } else { do { - if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + if (attrib_set || attrib_clear) { + fd.dwFileAttributes &= ~attrib_clear; + fd.dwFileAttributes |= attrib_set; + if (!fd.dwFileAttributes) + fd.dwFileAttributes |= FILE_ATTRIBUTE_NORMAL; + SetFileAttributesW(name, fd.dwFileAttributes); + } else { static const WCHAR fmt[] = {'%','s',' ',' ',' ','%','s','\n','\0'}; if (fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) { flags[0] = 'H';
1
0
0
0
Dan Kegel : ntdll: Fix NtQueryInformationFile test failures on Vista Home Basic.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: 46187dd609846c653398a8c14a17c7f50481c05b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=46187dd609846c653398a8c14…
Author: Dan Kegel <dank(a)kegel.com> Date: Thu Sep 24 09:51:42 2009 -0700 ntdll: Fix NtQueryInformationFile test failures on Vista Home Basic. --- dlls/ntdll/tests/file.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index a8052b1..2c23915 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -794,6 +794,7 @@ static void test_file_basic_information(void) FILE_BASIC_INFORMATION fbi; HANDLE h; int res; + int attrib_mask = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NORMAL; if (!(h = create_temp_file(0))) return; @@ -814,7 +815,7 @@ static void test_file_basic_information(void) memset(&fbi, 0, sizeof(fbi)); res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( fbi.FileAttributes == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fbi.FileAttributes ); + todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fbi.FileAttributes ); /* Then HIDDEN */ memset(&fbi, 0, sizeof(fbi)); @@ -825,7 +826,7 @@ static void test_file_basic_information(void) memset(&fbi, 0, sizeof(fbi)); res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( fbi.FileAttributes == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fbi.FileAttributes ); + todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fbi.FileAttributes ); /* Check NORMAL last of all (to make sure we can clear attributes) */ memset(&fbi, 0, sizeof(fbi)); @@ -836,7 +837,7 @@ static void test_file_basic_information(void) memset(&fbi, 0, sizeof(fbi)); res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( fbi.FileAttributes == FILE_ATTRIBUTE_NORMAL, "attribute %x not FILE_ATTRIBUTE_NORMAL\n", fbi.FileAttributes ); + todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_NORMAL, "attribute %x not 0\n", fbi.FileAttributes ); CloseHandle( h ); } @@ -854,6 +855,7 @@ static void test_file_all_information(void) } fai_buf; HANDLE h; int res; + int attrib_mask = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NORMAL; if (!(h = create_temp_file(0))) return; @@ -868,15 +870,14 @@ static void test_file_all_information(void) memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); fai_buf.fai.BasicInformation.FileAttributes = FILE_ATTRIBUTE_SYSTEM; res = pNtSetInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); - todo_wine - ok ( res == STATUS_INVALID_INFO_CLASS, "shouldn't be able to set FileAllInformation, res %x\n", res); + ok ( res == STATUS_INVALID_INFO_CLASS || res == STATUS_NOT_IMPLEMENTED, "shouldn't be able to set FileAllInformation, res %x\n", res); res = pNtSetInformationFile(h, &io, &fai_buf.fai.BasicInformation, sizeof fai_buf.fai.BasicInformation, FileBasicInformation); ok ( res == STATUS_SUCCESS, "can't set system attribute\n"); memset(&fai_buf.fai, 0, sizeof(fai_buf.fai)); res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); ok ( res == STATUS_SUCCESS, "can't get attributes, res %x\n", res); - todo_wine ok ( fai_buf.fai.BasicInformation.FileAttributes == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes ); + todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes ); /* Then HIDDEN */ memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); @@ -887,7 +888,7 @@ static void test_file_all_information(void) memset(&fai_buf.fai, 0, sizeof(fai_buf.fai)); res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( fai_buf.fai.BasicInformation.FileAttributes == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes ); + todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes ); /* Check NORMAL last of all (to make sure we can clear attributes) */ memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); @@ -898,7 +899,7 @@ static void test_file_all_information(void) memset(&fai_buf.fai, 0, sizeof(fai_buf.fai)); res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( fai_buf.fai.BasicInformation.FileAttributes == FILE_ATTRIBUTE_NORMAL, "attribute %x not FILE_ATTRIBUTE_NORMAL\n", fai_buf.fai.BasicInformation.FileAttributes ); + todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_NORMAL, "attribute %x not FILE_ATTRIBUTE_NORMAL\n", fai_buf.fai.BasicInformation.FileAttributes ); CloseHandle( h ); } @@ -914,8 +915,7 @@ static void test_file_both_information(void) memset(&fbi, 0, sizeof(fbi)); res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBothDirectoryInformation); - todo_wine - ok ( res == STATUS_INVALID_INFO_CLASS, "shouldn't be able to query FileBothDirectoryInformation, res %x\n", res); + ok ( res == STATUS_INVALID_INFO_CLASS || res == STATUS_NOT_IMPLEMENTED, "shouldn't be able to query FileBothDirectoryInformation, res %x\n", res); CloseHandle( h ); }
1
0
0
0
Dan Kegel : ntdll: Add initial test for NtQueryDirectoryFile().
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: fa12f03976f2e27f692b6680331c123c7f993ed1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa12f03976f2e27f692b66803…
Author: Dan Kegel <dank(a)kegel.com> Date: Thu Sep 24 09:49:46 2009 -0700 ntdll: Add initial test for NtQueryDirectoryFile(). --- dlls/ntdll/tests/Makefile.in | 1 + dlls/ntdll/tests/directory.c | 217 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 218 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in index 3425b5c..6bc2623 100644 --- a/dlls/ntdll/tests/Makefile.in +++ b/dlls/ntdll/tests/Makefile.in @@ -8,6 +8,7 @@ IMPORTS = kernel32 CTESTS = \ atom.c \ change.c \ + directory.c \ env.c \ error.c \ exception.c \ diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c new file mode 100644 index 0000000..776ad39 --- /dev/null +++ b/dlls/ntdll/tests/directory.c @@ -0,0 +1,217 @@ +/* Unit test suite for Ntdll directory functions + * + * Copyright 2007 Jeff Latimer + * Copyright 2007 Andrey Turkin + * Copyright 2008 Jeff Zaroyko + * Copyright 2009 Dan Kegel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * NOTES + * We use function pointers here as there is no import library for NTDLL on + * windows. + */ + +#include <stdio.h> +#include <stdarg.h> + +#include "ntstatus.h" +/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro + * definition errors when we get to winnt.h + */ +#define WIN32_NO_STATUS + +#include "wine/test.h" +#include "winternl.h" + +static NTSTATUS (WINAPI *pNtClose)( PHANDLE ); +static NTSTATUS (WINAPI *pNtOpenFile) ( PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, ULONG, ULONG ); +static NTSTATUS (WINAPI *pNtQueryDirectoryFile)(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK, + PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN); +static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING,LPCSTR); +static BOOL (WINAPI *pRtlDosPathNameToNtPathName_U)( LPCWSTR, PUNICODE_STRING, PWSTR*, CURDIR* ); +static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR ); +static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen, + LPCSTR src, DWORD srclen ); + +static void test_NtQueryDirectoryFile(void) +{ + NTSTATUS ret; + OBJECT_ATTRIBUTES attr; + UNICODE_STRING ntdirname; + char dirnameA[MAX_PATH]; + WCHAR dirnameW[MAX_PATH]; + static const char testdirA[] = "NtQueryDirectoryFile"; + static const char normalfileA[] = "n"; + static const char hiddenfileA[] = "h"; + static const char systemfileA[] = "s"; + char normalpathA[MAX_PATH]; + char hiddenpathA[MAX_PATH]; + char systempathA[MAX_PATH]; + HANDLE normalh = INVALID_HANDLE_VALUE; + HANDLE hiddenh = INVALID_HANDLE_VALUE; + HANDLE systemh = INVALID_HANDLE_VALUE; + int normal_found; + int hidden_found; + int system_found; + HANDLE dirh; + IO_STATUS_BLOCK io; + UINT data_pos; + UINT data_len; /* length of dir data */ + BYTE data[8192]; /* directory data */ + FILE_BOTH_DIRECTORY_INFORMATION *dir_info; + DWORD status; + int numfiles; + + ret = GetTempPathA(MAX_PATH, dirnameA); + if (!ret) + { + ok(0, "couldn't get temp dir\n"); + return; + } + if (ret + sizeof(testdirA)-1 + sizeof(normalfileA)-1 >= MAX_PATH) + { + ok(0, "MAX_PATH exceeded in constructing paths\n"); + return; + } + + strcat(dirnameA, testdirA); + + ret = CreateDirectoryA(dirnameA, NULL); + ok(ret == TRUE, "couldn't create directory '%s', ret %x, error %d\n", dirnameA, ret, GetLastError()); + + /* Create one normal file, one hidden, and one system file */ + GetTempFileNameA( dirnameA, normalfileA, 1, normalpathA ); + normalh = CreateFileA(normalpathA, GENERIC_READ | GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, 0); + ok( normalh != INVALID_HANDLE_VALUE, "failed to create temp file '%s'\n", normalpathA ); + + GetTempFileNameA( dirnameA, hiddenfileA, 1, hiddenpathA ); + hiddenh = CreateFileA(hiddenpathA, GENERIC_READ | GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_HIDDEN | FILE_FLAG_DELETE_ON_CLOSE, 0); + ok( hiddenh != INVALID_HANDLE_VALUE, "failed to create hidden temp file '%s'\n", hiddenpathA ); + + GetTempFileNameA( dirnameA, systemfileA, 2, systempathA ); + systemh = CreateFileA(systempathA, GENERIC_READ | GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_DELETE_ON_CLOSE, 0); + ok( systemh != INVALID_HANDLE_VALUE, "failed to create sys temp file '%s'\n", systempathA ); + if (normalh == INVALID_HANDLE_VALUE || hiddenh == INVALID_HANDLE_VALUE || systemh == INVALID_HANDLE_VALUE) + { + skip("can't test if we can't create files\n"); + goto done; + } + + pRtlMultiByteToUnicodeN(dirnameW, sizeof(dirnameW), NULL, dirnameA, strlen(dirnameA)+1); + if (!pRtlDosPathNameToNtPathName_U(dirnameW, &ntdirname, NULL, NULL)) + { + ok(0,"RtlDosPathNametoNtPathName_U failed\n"); + goto done; + } + /* Now read the directory and make sure both are found */ + InitializeObjectAttributes(&attr, &ntdirname, 0, 0, NULL); + status = pNtOpenFile( &dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, &attr, &io, + FILE_OPEN, + FILE_SYNCHRONOUS_IO_NONALERT|FILE_OPEN_FOR_BACKUP_INTENT|FILE_DIRECTORY_FILE); + ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%x, error %d\n", dirnameA, status, GetLastError()); + if (status != STATUS_SUCCESS) { + skip("can't test if we can't open the directory\n"); + goto done; + } + + pNtQueryDirectoryFile( dirh, NULL, NULL, NULL, &io, data, sizeof(data), + FileBothDirectoryInformation, FALSE, NULL, TRUE ); + ok (io.Status == STATUS_SUCCESS, "filed to query directory; status %x\n", io.Status); + data_len = io.Information; + ok (data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n"); + + normal_found = hidden_found = system_found = 0; + + data_pos = 0; + numfiles = 0; + while ((data_pos < data_len) && (numfiles < 5)) { + DWORD attrib; + dir_info = (FILE_BOTH_DIRECTORY_INFORMATION *)(data + data_pos); + attrib = dir_info->FileAttributes & (FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_HIDDEN); + switch (dir_info->FileName[0]) { + case '.': + break; + case 'n': + ok(dir_info->FileNameLength == 6*sizeof(WCHAR), "expected six-char name\n"); + ok(attrib == 0, "expected normal file\n"); + ok(normal_found == 0, "too many normal files\n"); + normal_found++; + break; + case 'h': + ok(dir_info->FileNameLength == 6*sizeof(WCHAR), "expected six-char name\n"); + todo_wine ok(attrib == FILE_ATTRIBUTE_HIDDEN, "expected hidden file\n"); + ok(hidden_found == 0, "too many hidden files\n"); + hidden_found++; + break; + case 's': + ok(dir_info->FileNameLength == 6*sizeof(WCHAR), "expected six-char name\n"); + todo_wine ok(attrib == FILE_ATTRIBUTE_SYSTEM, "expected system file\n"); + ok(system_found == 0, "too many system files\n"); + system_found++; + break; + default: + ok(FALSE, "unexpected filename found\n"); + } + if (dir_info->NextEntryOffset == 0) { + pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, sizeof(data), + FileBothDirectoryInformation, FALSE, NULL, FALSE ); + if (io.Status == STATUS_NO_MORE_FILES) + break; + ok (io.Status == STATUS_SUCCESS, "filed to query directory; status %x\n", io.Status); + data_len = io.Information; + if (data_len < sizeof(FILE_BOTH_DIRECTORY_INFORMATION)) + break; + data_pos = 0; + } else { + data_pos += dir_info->NextEntryOffset; + } + numfiles++; + } + ok(numfiles < 5, "too many loops\n"); + ok(normal_found > 0, "no normal files found\n"); + ok(hidden_found > 0, "no hidden files found\n"); + ok(system_found > 0, "no system files found\n"); + + pNtClose(dirh); +done: + CloseHandle(normalh); + CloseHandle(hiddenh); + CloseHandle(systemh); + RemoveDirectoryA(dirnameA); +} + +START_TEST(directory) +{ + HMODULE hntdll = GetModuleHandleA("ntdll.dll"); + if (!hntdll) + { + skip("not running on NT, skipping test\n"); + return; + } + + pNtClose = (void *)GetProcAddress(hntdll, "NtClose"); + pNtOpenFile = (void *)GetProcAddress(hntdll, "NtOpenFile"); + pNtQueryDirectoryFile = (void *)GetProcAddress(hntdll, "NtQueryDirectoryFile"); + pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz"); + pRtlDosPathNameToNtPathName_U = (void *)GetProcAddress(hntdll, "RtlDosPathNameToNtPathName_U"); + pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString"); + pRtlMultiByteToUnicodeN = (void *)GetProcAddress(hntdll,"RtlMultiByteToUnicodeN"); + + test_NtQueryDirectoryFile(); +}
1
0
0
0
Mike Kaplinskiy : ws2_32/tests: Test WSAAccept with CF_DEFER.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: 45bd91b28b014f28b8bf05552b387ee27a0a8816 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45bd91b28b014f28b8bf05552…
Author: Mike Kaplinskiy <mike.kaplinskiy(a)gmail.com> Date: Fri Sep 25 01:59:20 2009 -0400 ws2_32/tests: Test WSAAccept with CF_DEFER. --- dlls/ws2_32/tests/sock.c | 46 +++++++++++++++++++++++++++++++++++++--------- 1 files changed, 37 insertions(+), 9 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 3d470c6..57147c9 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1949,11 +1949,20 @@ static DWORD WINAPI AcceptKillThread(select_thread_params *par) return 0; } + +static int CALLBACK AlwaysDeferConditionFunc(LPWSABUF lpCallerId, LPWSABUF lpCallerData, LPQOS pQos, + LPQOS lpGQOS, LPWSABUF lpCalleeId, LPWSABUF lpCalleeData, + GROUP FAR * g, DWORD_PTR dwCallbackData) +{ + return CF_DEFER; +} + static void test_accept(void) { int ret; - SOCKET server_socket = INVALID_SOCKET; + SOCKET server_socket = INVALID_SOCKET, accepted = INVALID_SOCKET, connector = INVALID_SOCKET; struct sockaddr_in address; + int socklen; select_thread_params thread_params; HANDLE thread_handle = NULL; DWORD id; @@ -1966,6 +1975,7 @@ static void test_accept(void) } memset(&address, 0, sizeof(address)); + address.sin_addr.s_addr = inet_addr("127.0.0.1"); address.sin_family = AF_INET; ret = bind(server_socket, (struct sockaddr*) &address, sizeof(address)); if (ret != 0) @@ -1974,13 +1984,34 @@ static void test_accept(void) goto done; } - ret = listen(server_socket, 1); + socklen = sizeof(address); + ret = getsockname(server_socket, (struct sockaddr*)&address, &socklen); + if (ret != 0) { + skip("failed to lookup bind address, error %d\n", WSAGetLastError()); + goto done; + } + + ret = listen(server_socket, 5); if (ret != 0) { trace("error making server socket listen: %d\n", WSAGetLastError()); goto done; } + trace("Blocking accept next\n"); + + connector = socket(AF_INET, SOCK_STREAM, 0); + ok(connector != INVALID_SOCKET, "Failed to create connector socket, error %d\n", WSAGetLastError()); + + ret = connect(connector, (struct sockaddr*)&address, sizeof(address)); + ok(ret == 0, "connecting to accepting socket failed, error %d\n", WSAGetLastError()); + + accepted = WSAAccept(server_socket, NULL, NULL, (LPCONDITIONPROC) AlwaysDeferConditionFunc, 0); + ok(accepted == INVALID_SOCKET && WSAGetLastError() == WSATRY_AGAIN, "Failed to defer connection, %d\n", WSAGetLastError()); + + accepted = accept(server_socket, NULL, 0); + ok(accepted != INVALID_SOCKET, "Failed to accept deferred connection, error %d\n", WSAGetLastError()); + server_ready = CreateEventA(NULL, TRUE, FALSE, NULL); if (server_ready == INVALID_HANDLE_VALUE) { @@ -2011,6 +2042,10 @@ static void test_accept(void) ok(thread_params.ReadKilled, "closesocket did not wakeup accept\n"); done: + if (accepted != INVALID_SOCKET) + closesocket(accepted); + if (connector != INVALID_SOCKET) + closesocket(connector); if (thread_handle != NULL) CloseHandle(thread_handle); if (server_ready != INVALID_HANDLE_VALUE) @@ -2757,13 +2792,6 @@ static void test_GetAddrInfoW(void) pFreeAddrInfoW(result); } -static int CALLBACK AlwaysDeferConditionFunc(LPWSABUF lpCallerId, LPWSABUF lpCallerData, LPQOS pQos, - LPQOS lpGQOS, LPWSABUF lpCalleeId, LPWSABUF lpCalleeData, - GROUP FAR * g, DWORD_PTR dwCallbackData) -{ - return CF_DEFER; -} - static void test_AcceptEx(void) { SOCKET listener = INVALID_SOCKET;
1
0
0
0
Mike Kaplinskiy : ws2_32: Try accepting a connection before blocking.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: 3905c7a03095afaa517ddc0d8d231ec4ce32e2c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3905c7a03095afaa517ddc0d8…
Author: Mike Kaplinskiy <mike.kaplinskiy(a)gmail.com> Date: Fri Sep 25 01:59:16 2009 -0400 ws2_32: Try accepting a connection before blocking. --- dlls/ws2_32/socket.c | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index c3ee046..4462a9a 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1457,6 +1457,7 @@ static int WS2_register_async_shutdown( SOCKET s, int type ) SOCKET WINAPI WS_accept(SOCKET s, struct WS_sockaddr *addr, int *addrlen32) { + NTSTATUS status; SOCKET as; BOOL is_blocking; @@ -1464,33 +1465,32 @@ SOCKET WINAPI WS_accept(SOCKET s, struct WS_sockaddr *addr, is_blocking = _is_blocking(s); do { - if (is_blocking) - { - int fd = get_sock_fd( s, FILE_READ_DATA, NULL ); - if (fd == -1) return INVALID_SOCKET; - /* block here */ - do_block(fd, POLLIN, -1); - _sync_sock_state(s); /* let wineserver notice connection */ - release_sock_fd( s, fd ); - /* retrieve any error codes from it */ - SetLastError(_get_sock_error(s, FD_ACCEPT_BIT)); - /* FIXME: care about the error? */ - } + /* try accepting first (if there is a deferred connection) */ SERVER_START_REQ( accept_socket ) { req->lhandle = wine_server_obj_handle( SOCKET2HANDLE(s) ); req->access = GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE; req->attributes = OBJ_INHERIT; - set_error( wine_server_call( req ) ); + status = wine_server_call( req ); as = HANDLE2SOCKET( wine_server_ptr_handle( reply->handle )); } SERVER_END_REQ; - if (as) + if (!status) { if (addr) WS_getpeername(as, addr, addrlen32); return as; } - } while (is_blocking); + if (is_blocking && status == WSAEWOULDBLOCK) + { + int fd = get_sock_fd( s, FILE_READ_DATA, NULL ); + /* block here */ + do_block(fd, POLLIN, -1); + _sync_sock_state(s); /* let wineserver notice connection */ + release_sock_fd( s, fd ); + } + } while (is_blocking && status == WSAEWOULDBLOCK); + + set_error(status); return INVALID_SOCKET; }
1
0
0
0
Roderick Colenbrander : winex11: Don' t use ColorShifts for non-TrueColor bitmaps.
by Alexandre Julliard
25 Sep '09
25 Sep '09
Module: wine Branch: master Commit: 94657000835c1caf3cf0299b6103fb1e1068c1ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=94657000835c1caf3cf0299b6…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Thu Sep 10 16:00:00 2009 +0200 winex11: Don't use ColorShifts for non-TrueColor bitmaps. --- dlls/winex11.drv/bitmap.c | 8 +++----- dlls/winex11.drv/dib.c | 2 ++ dlls/winex11.drv/x11drv.h | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/bitmap.c b/dlls/winex11.drv/bitmap.c index fee2dbc..47d2562 100644 --- a/dlls/winex11.drv/bitmap.c +++ b/dlls/winex11.drv/bitmap.c @@ -102,6 +102,7 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) physDev->bitmap = physBitmap; physDev->drawable = physBitmap->pixmap; + physDev->color_shifts = physBitmap->trueColor ? &physBitmap->pixmap_color_shifts : NULL; SetRect( &physDev->drawable_rect, 0, 0, bitmap.bmWidth, bitmap.bmHeight ); physDev->dc_rect = physDev->drawable_rect; @@ -119,11 +120,6 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) wine_tsx11_unlock(); } - if(physDev->depth == 1) - physDev->color_shifts = NULL; - else - physDev->color_shifts = &physBitmap->pixmap_color_shifts; - return hbitmap; } @@ -167,11 +163,13 @@ BOOL CDECL X11DRV_CreateBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, LPVOID if(bitmap.bmBitsPixel == 1) { physBitmap->pixmap_depth = 1; + physBitmap->trueColor = FALSE; } else { physBitmap->pixmap_depth = screen_depth; physBitmap->pixmap_color_shifts = X11DRV_PALETTE_default_shifts; + physBitmap->trueColor = (visual->class == TrueColor || visual->class == DirectColor); } physBitmap->pixmap = XCreatePixmap(gdi_display, root_window, bitmap.bmWidth, bitmap.bmHeight, physBitmap->pixmap_depth); diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 0bf2548..4b15569 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -4749,11 +4749,13 @@ HBITMAP CDECL X11DRV_CreateDIBSection( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, if(dib.dsBm.bmBitsPixel == 1) { physBitmap->pixmap_depth = 1; + physBitmap->trueColor = FALSE; } else { physBitmap->pixmap_depth = screen_depth; physBitmap->pixmap_color_shifts = X11DRV_PALETTE_default_shifts; + physBitmap->trueColor = (visual->class == TrueColor || visual->class == DirectColor); } #ifdef HAVE_LIBXXSHM physBitmap->shminfo.shmid = -1; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 62b0d63..e97bbea 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -124,6 +124,7 @@ typedef struct XImage *image; /* cached XImage */ int *colorMap; /* color map info */ int nColorMap; + BOOL trueColor; CRITICAL_SECTION lock; /* GDI access lock */ enum x11drv_shm_mode shm_mode; #ifdef HAVE_LIBXXSHM
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200