winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
874 discussions
Start a n
N
ew thread
Zebediah Figura : winegstreamer: Don't query or set GStreamer duration if the filter is stopped.
by Alexandre Julliard
28 Feb '20
28 Feb '20
Module: wine Branch: master Commit: 18bdaaaa2687d6423a479a968037c62b4b9cedbb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=18bdaaaa2687d6423a479a96…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 27 20:40:35 2020 -0600 winegstreamer: Don't query or set GStreamer duration if the filter is stopped. This check is not equivalent to the existence of "their_src" for the MPEG-1 splitter, since that always exposes a source audio pin. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 488c9bd8a1..d469f2dbbf 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1841,7 +1841,8 @@ static HRESULT WINAPI GST_Seeking_GetCurrentPosition(IMediaSeeking *iface, REFER mark_wine_thread(); - if (!This->their_src) { + if (This->pin.pin.filter->state == State_Stopped) + { *pos = This->seek.llCurrent; TRACE("Cached value\n"); if (This->seek.llDuration) @@ -1892,7 +1893,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, return E_NOTIMPL; hr = SourceSeekingImpl_SetPositions(iface, pCur, curflags, pStop, stopflags); - if (!This->their_src) + if (This->pin.pin.filter->state == State_Stopped) return hr; curtype = type_from_flags(curflags);
1
0
0
0
Jacek Caban : msvcrt: Use more public declarations in exe entry points.
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: c6b852e3c37247a01547d8ab9d1630684f9c5aaa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c6b852e3c37247a01547d8ab…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 27 11:59:12 2020 +0100 msvcrt: Use more public declarations in exe entry points. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/crt_main.c | 8 ++------ dlls/msvcrt/crt_wmain.c | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/dlls/msvcrt/crt_main.c b/dlls/msvcrt/crt_main.c index d9e3e66964..81ec188058 100644 --- a/dlls/msvcrt/crt_main.c +++ b/dlls/msvcrt/crt_main.c @@ -25,15 +25,11 @@ #ifdef __MINGW32__ #include <stdarg.h> +#include <process.h> #include "windef.h" #include "winbase.h" -/* FIXME: Use msvcrt headers once we move to PE file */ -void __cdecl exit(int); -void __cdecl __getmainargs(int *, char ***, char ***, int, int *); -void __cdecl __set_app_type(int); - int __cdecl main(int argc, char **argv, char **env); static const IMAGE_NT_HEADERS *get_nt_header( void ) @@ -48,7 +44,7 @@ int __cdecl mainCRTStartup(void) char **argv, **env; __getmainargs(&argc, &argv, &env, 0, &new_mode); - __set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? 2 : 1); + _set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? _crt_gui_app : _crt_console_app); ret = main(argc, argv, env); diff --git a/dlls/msvcrt/crt_wmain.c b/dlls/msvcrt/crt_wmain.c index 60a67bbe30..77eb4dbfa7 100644 --- a/dlls/msvcrt/crt_wmain.c +++ b/dlls/msvcrt/crt_wmain.c @@ -25,15 +25,11 @@ #ifdef __MINGW32__ #include <stdarg.h> +#include <process.h> #include "windef.h" #include "winbase.h" -/* FIXME: Use msvcrt headers once we move to PE file */ -void __cdecl exit(int); -void __cdecl __wgetmainargs(int *, WCHAR ***, WCHAR ***, int, int *); -void __cdecl __set_app_type(int); - int __cdecl wmain(int argc, WCHAR **argv, WCHAR **env); static const IMAGE_NT_HEADERS *get_nt_header( void ) @@ -48,7 +44,7 @@ int __cdecl wmainCRTStartup(void) WCHAR **argv, **env; __wgetmainargs(&argc, &argv, &env, 0, &new_mode); - __set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? 2 : 1); + _set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? _crt_gui_app : _crt_console_app); ret = wmain(argc, argv, env);
1
0
0
0
Jacek Caban : include: Add corecrt_startup.h header.
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: c15733dead9510f5851e4a4cb6c51151d193fbb0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c15733dead9510f5851e4a4c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 27 11:59:02 2020 +0100 include: Add corecrt_startup.h header. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/tests/data.c | 1 - include/Makefile.in | 1 + include/msvcrt/corecrt_startup.h | 47 ++++++++++++++++++++++++++++++++++++++++ include/msvcrt/process.h | 2 +- 4 files changed, 49 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/tests/data.c b/dlls/msvcrt/tests/data.c index b664edbab1..050a234ce8 100644 --- a/dlls/msvcrt/tests/data.c +++ b/dlls/msvcrt/tests/data.c @@ -32,7 +32,6 @@ #include <errno.h> #include <direct.h> -void __cdecl __getmainargs(int *, char ***, char ***, int, int *); static int* (__cdecl *p___p___argc)(void); static char*** (__cdecl *p___p___argv)(void); diff --git a/include/Makefile.in b/include/Makefile.in index c4ade26688..ce0f6fc433 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -424,6 +424,7 @@ SOURCES = \ msvcrt/assert.h \ msvcrt/conio.h \ msvcrt/corecrt.h \ + msvcrt/corecrt_startup.h \ msvcrt/corecrt_stdio_config.h \ msvcrt/corecrt_wctype.h \ msvcrt/corecrt_wio.h \ diff --git a/include/msvcrt/corecrt_startup.h b/include/msvcrt/corecrt_startup.h new file mode 100644 index 0000000000..cd374ec10b --- /dev/null +++ b/include/msvcrt/corecrt_startup.h @@ -0,0 +1,47 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the Wine project. + */ + +#ifndef _INC_CORECRT_STARTUP +#define _INC_CORECRT_STARTUP + +#include <corecrt.h> + +typedef enum _crt_argv_mode +{ + _crt_argv_no_arguments, + _crt_argv_unexpanded_arguments, + _crt_argv_expanded_arguments +} _crt_argv_mode; + +typedef enum _crt_app_type +{ + _crt_unknown_app, + _crt_console_app, + _crt_gui_app +} _crt_app_type; + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _UCRT +_ACRTIMP void __cdecl __getmainargs(int *, char ***, char ***, int, int *); +_ACRTIMP void __cdecl __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, int *); +#define _set_app_type __set_app_type +#endif /* _UCRT */ + +_ACRTIMP errno_t __cdecl _configure_narrow_argv(_crt_argv_mode); +_ACRTIMP errno_t __cdecl _configure_wide_argv(_crt_argv_mode); +_ACRTIMP char **__cdecl _get_initial_narrow_environment(void); +_ACRTIMP wchar_t **__cdecl _get_initial_wide_environment(void); +_ACRTIMP int __cdecl _initialize_narrow_environment(void); +_ACRTIMP int __cdecl _initialize_wide_environment(void); +_ACRTIMP void __cdecl _set_app_type(_crt_app_type); + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_CORECRT_STARTUP */ diff --git a/include/msvcrt/process.h b/include/msvcrt/process.h index 2514e24238..f76807b43a 100644 --- a/include/msvcrt/process.h +++ b/include/msvcrt/process.h @@ -8,7 +8,7 @@ #ifndef __WINE_PROCESS_H #define __WINE_PROCESS_H -#include <corecrt.h> +#include <corecrt_startup.h> /* Process creation flags */ #define _P_WAIT 0
1
0
0
0
Jacek Caban : stdlib.h: Make externs declarations compatible with ucrt.
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: 118ef112938be7f65ce6f089f0f555f58df658ff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=118ef112938be7f65ce6f089…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 27 11:58:43 2020 +0100 stdlib.h: Make externs declarations compatible with ucrt. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/msvcrt/stdlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 5bcc2e4455..f07c44819d 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -81,7 +81,7 @@ typedef struct _lldiv_t { extern "C" { #endif -#ifdef __i386__ +#if defined(__i386__) || defined(_UCRT) extern unsigned int* __cdecl __p__osver(void); #define _osver (*__p__osver())
1
0
0
0
Dmitry Timoshkov : server: Ignore low word of a class instance when looking up for a window class.
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: 6ac2ba3e3cb8110c59071ab57098116a85427589 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6ac2ba3e3cb8110c59071ab5…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Feb 19 12:30:33 2020 +0800 server: Ignore low word of a class instance when looking up for a window class. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/class.c | 3 --- server/class.c | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index 67c95225f4..51bc116908 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -128,14 +128,11 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) WS_OVERLAPPEDWINDOW + WS_HSCROLL + WS_VSCROLL, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 0, hInstance2, 0); -todo_wine_if (!global) ok(hTestWnd != 0, "Failed to create window for hInstance %p\n", hInstance2); -todo_wine_if (!global) ok((HINSTANCE)GetClassLongPtrA(hTestWnd, GCLP_HMODULE) == hInstance, "Wrong GCL instance %p != %p\n", (HINSTANCE)GetClassLongPtrA(hTestWnd, GCLP_HMODULE), hInstance); -todo_wine_if (!global) ok((HINSTANCE)GetWindowLongPtrA(hTestWnd, GWLP_HINSTANCE) == hInstance2, "Wrong GWL instance %p != %p\n", (HINSTANCE)GetWindowLongPtrA(hTestWnd, GWLP_HINSTANCE), hInstance2); diff --git a/server/class.c b/server/class.c index b8240bd568..92cbfa2d7e 100644 --- a/server/class.c +++ b/server/class.c @@ -100,9 +100,12 @@ static struct window_class *find_class( struct process *process, atom_t atom, mo LIST_FOR_EACH( ptr, &process->classes ) { + int is_win16; struct window_class *class = LIST_ENTRY( ptr, struct window_class, entry ); if (class->atom != atom) continue; - if (!instance || !class->local || class->instance == instance) return class; + is_win16 = !(class->instance >> 16); + if (!instance || !class->local || class->instance == instance || + (!is_win16 && ((class->instance & ~0xffff) == (instance & ~0xffff)))) return class; } return NULL; }
1
0
0
0
Dmitry Timoshkov : user32/tests: Add some tests for classes with non-zero low word instance.
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: e2c0f51312b367989def1c4dd850aac796bd0943 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e2c0f51312b367989def1c4d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Feb 19 12:29:54 2020 +0800 user32/tests: Add some tests for classes with non-zero low word instance. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/class.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index 2702fa00b9..67c95225f4 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -98,6 +98,7 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) LONG i; WCHAR str[20]; ATOM classatom; + HINSTANCE hInstance2; cls.style = CS_HREDRAW | CS_VREDRAW | (global?CS_GLOBALCLASS:0); cls.lpfnWndProc = ClassTest_WndProc; @@ -121,6 +122,26 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) "RegisterClass of the same class should fail for the second time\n"); /* Setup windows */ + hInstance2 = (HINSTANCE)(((ULONG_PTR)hInstance & ~0xffff) | 0xdead); + + hTestWnd = CreateWindowW (className, winName, + WS_OVERLAPPEDWINDOW + WS_HSCROLL + WS_VSCROLL, + CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, + 0, hInstance2, 0); +todo_wine_if (!global) + ok(hTestWnd != 0, "Failed to create window for hInstance %p\n", hInstance2); + +todo_wine_if (!global) + ok((HINSTANCE)GetClassLongPtrA(hTestWnd, GCLP_HMODULE) == hInstance, + "Wrong GCL instance %p != %p\n", + (HINSTANCE)GetClassLongPtrA(hTestWnd, GCLP_HMODULE), hInstance); +todo_wine_if (!global) + ok((HINSTANCE)GetWindowLongPtrA(hTestWnd, GWLP_HINSTANCE) == hInstance2, + "Wrong GWL instance %p != %p\n", + (HINSTANCE)GetWindowLongPtrA(hTestWnd, GWLP_HINSTANCE), hInstance2); + + DestroyWindow(hTestWnd); + hTestWnd = CreateWindowW (className, winName, WS_OVERLAPPEDWINDOW + WS_HSCROLL + WS_VSCROLL, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, @@ -128,6 +149,14 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) ok(hTestWnd!=0, "Failed to create window\n"); + ok((HINSTANCE)GetClassLongPtrA(hTestWnd, GCLP_HMODULE) == hInstance, + "Wrong GCL instance %p/%p\n", + (HINSTANCE)GetClassLongPtrA(hTestWnd, GCLP_HMODULE), hInstance); + ok((HINSTANCE)GetWindowLongPtrA(hTestWnd, GWLP_HINSTANCE) == hInstance, + "Wrong GWL instance %p/%p\n", + (HINSTANCE)GetWindowLongPtrA(hTestWnd, GWLP_HINSTANCE), hInstance); + + /* test initial values of valid classwords */ for(i=0; i<NUMCLASSWORDS; i++) { @@ -1491,6 +1520,8 @@ START_TEST(class) ClassTest(hInstance,FALSE); ClassTest(hInstance,TRUE); + ClassTest((HANDLE)((ULONG_PTR)hInstance | 0x1234), FALSE); + ClassTest((HANDLE)((ULONG_PTR)hInstance | 0x1234), TRUE); CreateDialogParamTest(hInstance); test_styles(); test_builtinproc();
1
0
0
0
Zebediah Figura : kernel32: Reimplement DefineDosDevice() on top of NT symbolic links.
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: 3641983714e054adb88604a3e1cb52d8296c9c45 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3641983714e054adb88604a3…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Feb 25 10:10:46 2020 -0600 kernel32: Reimplement DefineDosDevice() on top of NT symbolic links. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/volume.c | 12 ++--- dlls/kernel32/volume.c | 105 +++++++++++++------------------------------ 2 files changed, 36 insertions(+), 81 deletions(-) diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index 5fa8a9f05d..b9121a4af4 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.c @@ -126,11 +126,11 @@ static void test_dos_devices(void) } ret = DefineDosDeviceA( 0, drivestr, "C:/windows/" ); - todo_wine ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError()); + ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError()); ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); - todo_wine ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError()); - todo_wine ok(!strcmp(buf, "\\??\\C:\\windows\\"), "got path %s\n", debugstr_a(buf)); + ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError()); + ok(!strcmp(buf, "\\??\\C:\\windows\\"), "got path %s\n", debugstr_a(buf)); sprintf(buf, "%s/system32", drivestr); file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, @@ -146,7 +146,7 @@ static void test_dos_devices(void) todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL); - todo_wine ok(ret, "failed to remove drive %s, error %u\n", drivestr, GetLastError()); + ok(ret, "failed to remove drive %s, error %u\n", drivestr, GetLastError()); ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); ok(!ret, "expected failure\n"); @@ -164,8 +164,8 @@ static void test_dos_devices(void) ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError()); ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); - todo_wine ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError()); - todo_wine ok(!strcmp(buf, "\\??\\C:\\windows\\"), "got path %s\n", debugstr_a(buf)); + ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError()); + ok(!strcmp(buf, "\\??\\C:\\windows\\"), "got path %s\n", debugstr_a(buf)); sprintf(buf, "%s/system32", drivestr); file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c index 02d14cdcc9..5bfebf6057 100644 --- a/dlls/kernel32/volume.c +++ b/dlls/kernel32/volume.c @@ -39,6 +39,7 @@ #include "ntddcdrm.h" #define WINE_MOUNTMGR_EXTENSIONS #include "ddk/mountmgr.h" +#include "ddk/wdm.h" #include "kernel_private.h" #include "wine/library.h" #include "wine/unicode.h" @@ -68,29 +69,6 @@ enum fs_type FS_UDF /* For reference [E] = Ecma-167.pdf, [U] = udf260.pdf */ }; -/* get the path of a dos device symlink in the $WINEPREFIX/dosdevices directory */ -static char *get_dos_device_path( LPCWSTR name ) -{ - const char *config_dir = wine_get_config_dir(); - char *buffer, *dev; - int i; - - if (!(buffer = HeapAlloc( GetProcessHeap(), 0, - strlen(config_dir) + sizeof("/dosdevices/") + 5 ))) - { - SetLastError( ERROR_NOT_ENOUGH_MEMORY ); - return NULL; - } - strcpy( buffer, config_dir ); - strcat( buffer, "/dosdevices/" ); - dev = buffer + strlen(buffer); - /* no codepage conversion, DOS device names are ASCII anyway */ - for (i = 0; i < 5; i++) - if (!(dev[i] = (char)tolowerW(name[i]))) break; - dev[5] = 0; - return buffer; -} - /* read the contents of an NT symlink object */ static NTSTATUS read_nt_symlink( const WCHAR *name, WCHAR *target, DWORD size ) { @@ -1128,73 +1106,50 @@ err_ret: /*********************************************************************** * DefineDosDeviceW (KERNEL32.@) */ -BOOL WINAPI DefineDosDeviceW( DWORD flags, LPCWSTR devname, LPCWSTR targetpath ) +BOOL WINAPI DefineDosDeviceW( DWORD flags, const WCHAR *device, const WCHAR *target ) { - DWORD len, dosdev; - BOOL ret = FALSE; - char *path = NULL, *target, *p; + WCHAR link_name[15] = {'\\','D','o','s','D','e','v','i','c','e','s','\\',0}; + UNICODE_STRING nt_name, nt_target; + OBJECT_ATTRIBUTES attr; + NTSTATUS status; + HANDLE handle; - TRACE("%x, %s, %s\n", flags, debugstr_w(devname), debugstr_w(targetpath)); + TRACE("%#x, %s, %s\n", flags, debugstr_w(device), debugstr_w(target)); - if (!(flags & DDD_REMOVE_DEFINITION)) + if (flags & ~(DDD_RAW_TARGET_PATH | DDD_REMOVE_DEFINITION)) + FIXME("Ignoring flags %#x.\n", flags & ~(DDD_RAW_TARGET_PATH | DDD_REMOVE_DEFINITION)); + + strcatW( link_name, device ); + RtlInitUnicodeString( &nt_name, link_name ); + InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL ); + if (flags & DDD_REMOVE_DEFINITION) { - if (!(flags & DDD_RAW_TARGET_PATH)) - { - FIXME( "(0x%08x,%s,%s) DDD_RAW_TARGET_PATH flag not set, not supported yet\n", - flags, debugstr_w(devname), debugstr_w(targetpath) ); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + if (!set_ntstatus( NtOpenSymbolicLinkObject( &handle, 0, &attr ) )) return FALSE; - } - len = WideCharToMultiByte( CP_UNIXCP, 0, targetpath, -1, NULL, 0, NULL, NULL ); - if ((target = HeapAlloc( GetProcessHeap(), 0, len ))) + SERVER_START_REQ( unlink_object ) { - WideCharToMultiByte( CP_UNIXCP, 0, targetpath, -1, target, len, NULL, NULL ); - for (p = target; *p; p++) if (*p == '\\') *p = '/'; + req->handle = wine_server_obj_handle( handle ); + status = wine_server_call( req ); } - else - { - SetLastError( ERROR_NOT_ENOUGH_MEMORY ); - return FALSE; - } - } - else target = NULL; - - /* first check for a DOS device */ - - if ((dosdev = RtlIsDosDeviceName_U( devname ))) - { - WCHAR name[5]; + SERVER_END_REQ; + NtClose( handle ); - memcpy( name, devname + HIWORD(dosdev)/sizeof(WCHAR), LOWORD(dosdev) ); - name[LOWORD(dosdev)/sizeof(WCHAR)] = 0; - path = get_dos_device_path( name ); - } - else if (isalphaW(devname[0]) && devname[1] == ':' && !devname[2]) /* drive mapping */ - { - path = get_dos_device_path( devname ); + return set_ntstatus( status ); } - else SetLastError( ERROR_FILE_NOT_FOUND ); - if (path) + if (!(flags & DDD_RAW_TARGET_PATH)) { - if (target) + if (!RtlDosPathNameToNtPathName_U( target, &nt_target, NULL, NULL)) { - TRACE( "creating symlink %s -> %s\n", path, target ); - unlink( path ); - if (!symlink( target, path )) ret = TRUE; - else FILE_SetDosError(); - } - else - { - TRACE( "removing symlink %s\n", path ); - if (!unlink( path )) ret = TRUE; - else FILE_SetDosError(); + SetLastError( ERROR_PATH_NOT_FOUND ); + return FALSE; } - HeapFree( GetProcessHeap(), 0, path ); } - HeapFree( GetProcessHeap(), 0, target ); - return ret; + else + RtlInitUnicodeString( &nt_target, target ); + + return set_ntstatus( NtCreateSymbolicLinkObject( &handle, SYMBOLIC_LINK_ALL_ACCESS, &attr, &nt_target ) ); }
1
0
0
0
Zebediah Figura : kernel32/tests: Add more tests for DefineDosDevice().
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: 4ab43e28d01dd4b36e53784d209169518a8b74b8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4ab43e28d01dd4b36e53784d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Feb 25 10:10:45 2020 -0600 kernel32/tests: Add more tests for DefineDosDevice(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/volume.c | 79 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index 348ce1a76c..5fa8a9f05d 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.c @@ -24,6 +24,7 @@ #include "ntddstor.h" #include <stdio.h> #include "ddk/ntddcdvd.h" +#include "ddk/mountmgr.h" #include <pshpack1.h> struct COMPLETE_DVD_LAYER_DESCRIPTOR @@ -105,11 +106,12 @@ static void test_query_dos_deviceA(void) HeapFree( GetProcessHeap(), 0, buffer ); } -static void test_define_dos_deviceA(void) +static void test_dos_devices(void) { + char buf[MAX_PATH], buf2[400]; char drivestr[3]; - char buf[MAX_PATH]; - DWORD ret; + HANDLE file; + BOOL ret; /* Find an unused drive letter */ drivestr[1] = ':'; @@ -123,20 +125,65 @@ static void test_define_dos_deviceA(void) return; } - /* Map it to point to the current directory */ - ret = GetCurrentDirectoryA(sizeof(buf), buf); - ok(ret, "GetCurrentDir\n"); + ret = DefineDosDeviceA( 0, drivestr, "C:/windows/" ); + todo_wine ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError()); - ret = DefineDosDeviceA(0, drivestr, buf); - todo_wine - ok(ret, "Could not make drive %s point to %s!\n", drivestr, buf); + ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); + todo_wine ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError()); + todo_wine ok(!strcmp(buf, "\\??\\C:\\windows\\"), "got path %s\n", debugstr_a(buf)); - if (!ret) { - skip("can't test removing fake drive\n"); - } else { - ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL); - ok(ret, "Could not remove fake drive %s!\n", drivestr); - } + sprintf(buf, "%s/system32", drivestr); + file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); + todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + CloseHandle( file ); + + /* but it's not a volume mount point */ + + sprintf(buf, "%s\\", drivestr); + ret = GetVolumeNameForVolumeMountPointA( buf, buf2, sizeof(buf2) ); + ok(!ret, "expected failure\n"); + todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + + ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL); + todo_wine ok(ret, "failed to remove drive %s, error %u\n", drivestr, GetLastError()); + + ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); + ok(!ret, "expected failure\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError()); + + sprintf(buf, "%s/system32", drivestr); + file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); + ok(file == INVALID_HANDLE_VALUE, "expected failure\n"); + todo_wine ok(GetLastError() == ERROR_PATH_NOT_FOUND, "got error %u\n", GetLastError()); + + /* try with DDD_RAW_TARGET_PATH */ + + ret = DefineDosDeviceA( DDD_RAW_TARGET_PATH, drivestr, "\\??\\C:\\windows\\" ); + ok(ret, "failed to define drive %s, error %u\n", drivestr, GetLastError()); + + ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); + todo_wine ok(ret, "failed to query drive %s, error %u\n", drivestr, GetLastError()); + todo_wine ok(!strcmp(buf, "\\??\\C:\\windows\\"), "got path %s\n", debugstr_a(buf)); + + sprintf(buf, "%s/system32", drivestr); + file = CreateFileA( buf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); + todo_wine ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + CloseHandle( file ); + + sprintf(buf, "%s\\", drivestr); + ret = GetVolumeNameForVolumeMountPointA( buf, buf2, sizeof(buf2) ); + ok(!ret, "expected failure\n"); + todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + + ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL); + ok(ret, "failed to remove drive %s, error %u\n", drivestr, GetLastError()); + + ret = QueryDosDeviceA( drivestr, buf, sizeof(buf) ); + ok(!ret, "expected failure\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError()); } static void test_FindFirstVolume(void) @@ -1272,7 +1319,7 @@ START_TEST(volume) pGetVolumePathNamesForVolumeNameW = (void *) GetProcAddress(hdll, "GetVolumePathNamesForVolumeNameW"); test_query_dos_deviceA(); - test_define_dos_deviceA(); + test_dos_devices(); test_FindFirstVolume(); test_GetVolumePathNameA(); test_GetVolumePathNameW();
1
0
0
0
Paul Gofman : iphlpapi: Return NO_ERROR from NotifyUnicastIpAddressChange() semi-stub.
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: 1f2a7da28a2f1b785b03a377234ea8a1be1a0517 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1f2a7da28a2f1b785b03a377…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Thu Feb 27 14:10:33 2020 +0300 iphlpapi: Return NO_ERROR from NotifyUnicastIpAddressChange() semi-stub. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/iphlpapi_main.c | 2 +- dlls/iphlpapi/tests/iphlpapi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index c248fb50b4..9ee85caeb3 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -2808,7 +2808,7 @@ DWORD WINAPI NotifyUnicastIpAddressChange(ADDRESS_FAMILY family, PUNICAST_IPADDR if (init_notify) callback(context, NULL, MibInitialNotification); - return ERROR_NOT_SUPPORTED; + return NO_ERROR; } /****************************************************************** diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 9979cd5abc..77475ca4df 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -2319,7 +2319,7 @@ static void test_NotifyUnicastIpAddressChange(void) callback_called = FALSE; ret = pNotifyUnicastIpAddressChange(AF_INET, test_ipaddtess_change_callback, &callback_called, TRUE, &handle); - todo_wine ok(ret == NO_ERROR, "Unexpected ret %#x.\n", ret); + ok(ret == NO_ERROR, "Unexpected ret %#x.\n", ret); ok(callback_called, "Callback was not called.\n"); ret = pCancelMibChangeNotify2(handle);
1
0
0
0
Paul Gofman : iphlpapi: Support InitialNotification flag in NotifyUnicastIpAddressChange().
by Alexandre Julliard
27 Feb '20
27 Feb '20
Module: wine Branch: master Commit: 5cdd3848f500350dd02e3b8f6d87766c3689f48a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5cdd3848f500350dd02e3b8f…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Thu Feb 27 14:10:32 2020 +0300 iphlpapi: Support InitialNotification flag in NotifyUnicastIpAddressChange(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48669
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/iphlpapi_main.c | 6 +++++- dlls/iphlpapi/tests/iphlpapi.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 429958198d..c248fb50b4 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -2801,9 +2801,13 @@ DWORD WINAPI NotifyRouteChange(PHANDLE Handle, LPOVERLAPPED overlapped) DWORD WINAPI NotifyUnicastIpAddressChange(ADDRESS_FAMILY family, PUNICAST_IPADDRESS_CHANGE_CALLBACK callback, PVOID context, BOOLEAN init_notify, PHANDLE handle) { - FIXME("(family %d, callback %p, context %p, init_notify %d, handle %p): stub\n", + FIXME("(family %d, callback %p, context %p, init_notify %d, handle %p): semi-stub\n", family, callback, context, init_notify, handle); if (handle) *handle = NULL; + + if (init_notify) + callback(context, NULL, MibInitialNotification); + return ERROR_NOT_SUPPORTED; } diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 8ccbf5f9b6..9979cd5abc 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -75,6 +75,9 @@ static DWORD (WINAPI *pConvertInterfaceNameToLuidA)(const char*,NET_LUID*); static DWORD (WINAPI *pConvertInterfaceNameToLuidW)(const WCHAR*,NET_LUID*); static DWORD (WINAPI *pConvertLengthToIpv4Mask)(ULONG,ULONG*); static DWORD (WINAPI *pParseNetworkString)(const WCHAR*,DWORD,NET_ADDRESS_INFO*,USHORT*,BYTE*); +static DWORD (WINAPI *pNotifyUnicastIpAddressChange)(ADDRESS_FAMILY, PUNICAST_IPADDRESS_CHANGE_CALLBACK, + PVOID, BOOLEAN, HANDLE *); +static DWORD (WINAPI *pCancelMibChangeNotify2)(HANDLE); static PCHAR (WINAPI *pif_indextoname)(NET_IFINDEX,PCHAR); static NET_IFINDEX (WINAPI *pif_nametoindex)(const char*); @@ -107,6 +110,8 @@ static void loadIPHlpApi(void) pParseNetworkString = (void *)GetProcAddress(hLibrary, "ParseNetworkString"); pif_indextoname = (void *)GetProcAddress(hLibrary, "if_indextoname"); pif_nametoindex = (void *)GetProcAddress(hLibrary, "if_nametoindex"); + pNotifyUnicastIpAddressChange = (void *)GetProcAddress(hLibrary, "NotifyUnicastIpAddressChange"); + pCancelMibChangeNotify2 = (void *)GetProcAddress(hLibrary, "CancelMibChangeNotify2"); } } @@ -2287,6 +2292,41 @@ static void test_ParseNetworkString(void) } } +static void WINAPI test_ipaddtess_change_callback(PVOID context, PMIB_UNICASTIPADDRESS_ROW row, + MIB_NOTIFICATION_TYPE notification_type) +{ + BOOL *callback_called = context; + + *callback_called = TRUE; + + ok(notification_type == MibInitialNotification, "Unexpected notification_type %#x.\n", + notification_type); + ok(!row, "Unexpected row %p.\n", row); +} + +static void test_NotifyUnicastIpAddressChange(void) +{ + BOOL callback_called; + HANDLE handle; + DWORD ret; + + if (!pNotifyUnicastIpAddressChange) + { + win_skip("NotifyUnicastIpAddressChange not available.\n"); + return; + } + + callback_called = FALSE; + ret = pNotifyUnicastIpAddressChange(AF_INET, test_ipaddtess_change_callback, + &callback_called, TRUE, &handle); + todo_wine ok(ret == NO_ERROR, "Unexpected ret %#x.\n", ret); + ok(callback_called, "Callback was not called.\n"); + + ret = pCancelMibChangeNotify2(handle); + ok(ret == NO_ERROR, "Unexpected ret %#x.\n", ret); + ok(!CloseHandle(handle), "CloseHandle() succeded.\n"); +} + START_TEST(iphlpapi) { @@ -2318,6 +2358,7 @@ START_TEST(iphlpapi) test_GetTcp6Table(); test_GetUdp6Table(); test_ParseNetworkString(); + test_NotifyUnicastIpAddressChange(); freeIPHlpApi(); } }
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
88
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
88
Results per page:
10
25
50
100
200