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
January 2016
----- 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
627 discussions
Start a n
N
ew thread
Alexandre Julliard : server: Store the desktop object names inside their window station.
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: fcc977c139a24557e94fcefbe856ee691c572a5b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fcc977c139a24557e94fcefbe…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 20 22:27:44 2016 +0900 server: Store the desktop object names inside their window station. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/winstation.c | 4 +- server/user.h | 1 + server/winstation.c | 110 ++++++++++++++++++----------------------- 3 files changed, 50 insertions(+), 65 deletions(-) diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index db82026..21df249 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -452,8 +452,8 @@ static void test_getuserobjectinformation(void) name_info = (OBJECT_NAME_INFORMATION *)buffer; status = pNtQueryObject(desk, ObjectNameInformation, name_info, sizeof(buffer), NULL); ok(!status, "expected STATUS_SUCCESS, got %08x\n", status); - todo_wine ok(lstrcmpW(name_info->Name.Buffer, foobarTestW) == 0, - "expected '\\foobarTest', got %s\n", wine_dbgstr_w(name_info->Name.Buffer)); + ok(lstrcmpW(name_info->Name.Buffer, foobarTestW) == 0, + "expected '\\foobarTest', got %s\n", wine_dbgstr_w(name_info->Name.Buffer)); /** Tests for UOI_TYPE **/ diff --git a/server/user.h b/server/user.h index 08d0959..89646f1 100644 --- a/server/user.h +++ b/server/user.h @@ -49,6 +49,7 @@ struct winstation struct list desktops; /* list of desktops of this winstation */ struct clipboard *clipboard; /* clipboard information */ struct atom_table *atom_table; /* global atom table */ + struct namespace *desktop_names; /* namespace for desktops of this winstation */ }; struct global_cursor diff --git a/server/winstation.c b/server/winstation.c index 33e121f..7a6b9fc 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -42,7 +42,6 @@ static struct list winstation_list = LIST_INIT(winstation_list); -static struct namespace *winstation_namespace; static void winstation_dump( struct object *obj, int verbose ); static struct object_type *winstation_get_type( struct object *obj ); @@ -104,9 +103,6 @@ static struct winstation *create_winstation( struct directory *root, const struc { struct winstation *winstation; - if (!winstation_namespace && !(winstation_namespace = create_namespace( 7 ))) - return NULL; - if (memchrW( name->str, '\\', name->len / sizeof(WCHAR) )) /* no backslash allowed in name */ { set_error( STATUS_INVALID_PARAMETER ); @@ -123,6 +119,11 @@ static struct winstation *create_winstation( struct directory *root, const struc winstation->atom_table = NULL; list_add_tail( &winstation_list, &winstation->entry ); list_init( &winstation->desktops ); + if (!(winstation->desktop_names = create_namespace( 7 ))) + { + release_object( winstation ); + return NULL; + } } } return winstation; @@ -157,6 +158,7 @@ static void winstation_destroy( struct object *obj ) list_remove( &winstation->entry ); if (winstation->clipboard) release_object( winstation->clipboard ); if (winstation->atom_table) release_object( winstation->atom_table ); + free( winstation->desktop_names ); } static unsigned int winstation_map_access( struct object *obj, unsigned int access ) @@ -177,32 +179,6 @@ struct winstation *get_process_winstation( struct process *process, unsigned int access, &winstation_ops ); } -/* build the full name of a desktop object */ -static WCHAR *build_desktop_name( const struct unicode_str *name, - struct winstation *winstation, struct unicode_str *res ) -{ - const WCHAR *winstation_name; - WCHAR *full_name; - data_size_t winstation_len; - - if (memchrW( name->str, '\\', name->len / sizeof(WCHAR) )) - { - set_error( STATUS_INVALID_PARAMETER ); - return NULL; - } - - if (!(winstation_name = get_object_name( &winstation->obj, &winstation_len ))) - winstation_len = 0; - - res->len = winstation_len + name->len + sizeof(WCHAR); - if (!(full_name = mem_alloc( res->len ))) return NULL; - memcpy( full_name, winstation_name, winstation_len ); - full_name[winstation_len / sizeof(WCHAR)] = '\\'; - memcpy( full_name + winstation_len / sizeof(WCHAR) + 1, name->str, name->len ); - res->str = full_name; - return full_name; -} - /* retrieve a pointer to a desktop object */ struct desktop *get_desktop_obj( struct process *process, obj_handle_t handle, unsigned int access ) { @@ -214,12 +190,14 @@ static struct desktop *create_desktop( const struct unicode_str *name, unsigned unsigned int flags, struct winstation *winstation ) { struct desktop *desktop; - struct unicode_str full_str; - WCHAR *full_name; - if (!(full_name = build_desktop_name( name, winstation, &full_str ))) return NULL; + if (memchrW( name->str, '\\', name->len / sizeof(WCHAR) )) /* no backslash allowed in name */ + { + set_error( STATUS_INVALID_PARAMETER ); + return NULL; + } - if ((desktop = create_named_object( winstation_namespace, &desktop_ops, &full_str, attr ))) + if ((desktop = create_named_object( winstation->desktop_names, &desktop_ops, name, attr ))) { if (get_error() != STATUS_OBJECT_NAME_EXISTS) { @@ -238,7 +216,6 @@ static struct desktop *create_desktop( const struct unicode_str *name, unsigned list_init( &desktop->hotkeys ); } } - free( full_name ); return desktop; } @@ -423,21 +400,6 @@ void close_thread_desktop( struct thread *thread ) if (handle) close_handle( thread->process, handle ); } -/* set the reply data from the object name */ -static void set_reply_data_obj_name( struct object *obj, int full_name ) -{ - data_size_t len; - const WCHAR *ptr, *name = get_object_name( obj, &len ); - - /* if there is a backslash return the part of the name after it */ - if (name && !full_name && (ptr = memchrW( name, '\\', len/sizeof(WCHAR) ))) - { - len -= (ptr + 1 - name) * sizeof(WCHAR); - name = ptr + 1; - } - if (name) set_reply_data( name, min( len, get_reply_max_size() )); -} - /* create a window station */ DECL_HANDLER(create_winstation) { @@ -547,15 +509,8 @@ DECL_HANDLER(open_desktop) if (winstation) { - struct unicode_str full_str; - WCHAR *full_name; - - if ((full_name = build_desktop_name( &name, winstation, &full_str ))) - { - reply->handle = open_object( winstation_namespace, &full_str, &desktop_ops, req->access, - req->attributes ); - free( full_name ); - } + reply->handle = open_object( winstation->desktop_names, &name, &desktop_ops, + req->access, req->attributes ); release_object( winstation ); } } @@ -658,6 +613,7 @@ DECL_HANDLER(set_thread_desktop) DECL_HANDLER(set_user_object_info) { struct object *obj; + data_size_t len; if (!(obj = get_handle_obj( current->process, req->handle, 0, NULL ))) return; @@ -681,8 +637,30 @@ DECL_HANDLER(set_user_object_info) release_object( obj ); return; } - if (get_reply_max_size()) - set_reply_data_obj_name( obj, (req->flags & SET_USER_OBJECT_GET_FULL_NAME) != 0 ); + if (obj->ops == &desktop_ops && get_reply_max_size() && (req->flags & SET_USER_OBJECT_GET_FULL_NAME)) + { + struct desktop *desktop = (struct desktop *)obj; + data_size_t winstation_len, desktop_len; + const WCHAR *winstation_name = get_object_name( &desktop->winstation->obj, &winstation_len ); + const WCHAR *desktop_name = get_object_name( obj, &desktop_len ); + WCHAR *full_name; + + if (!winstation_name) winstation_len = 0; + if (!desktop_name) desktop_len = 0; + len = winstation_len + desktop_len + sizeof(WCHAR); + if ((full_name = mem_alloc( len ))) + { + memcpy( full_name, winstation_name, winstation_len ); + full_name[winstation_len / sizeof(WCHAR)] = '\\'; + memcpy( full_name + winstation_len / sizeof(WCHAR) + 1, desktop_name, desktop_len ); + set_reply_data_ptr( full_name, min( len, get_reply_max_size() )); + } + } + else + { + const WCHAR *name = get_object_name( obj, &len ); + if (name) set_reply_data( name, min( len, get_reply_max_size() )); + } release_object( obj ); } @@ -692,15 +670,18 @@ DECL_HANDLER(enum_winstation) { unsigned int index = 0; struct winstation *winsta; + const WCHAR *name; + data_size_t len; LIST_FOR_EACH_ENTRY( winsta, &winstation_list, struct winstation, entry ) { unsigned int access = WINSTA_ENUMERATE; if (req->index > index++) continue; if (!check_object_access( &winsta->obj, &access )) continue; - set_reply_data_obj_name( &winsta->obj, 0 ); clear_error(); reply->next = index; + if ((name = get_object_name( &winsta->obj, &len ))) + set_reply_data( name, min( len, get_reply_max_size() )); return; } set_error( STATUS_NO_MORE_ENTRIES ); @@ -713,6 +694,8 @@ DECL_HANDLER(enum_desktop) struct winstation *winstation; struct desktop *desktop; unsigned int index = 0; + const WCHAR *name; + data_size_t len; if (!(winstation = (struct winstation *)get_handle_obj( current->process, req->winstation, WINSTA_ENUMDESKTOPS, &winstation_ops ))) @@ -724,7 +707,8 @@ DECL_HANDLER(enum_desktop) if (req->index > index++) continue; if (!desktop->obj.name) continue; if (!check_object_access( &desktop->obj, &access )) continue; - set_reply_data_obj_name( &desktop->obj, 0 ); + if ((name = get_object_name( &desktop->obj, &len ))) + set_reply_data( name, min( len, get_reply_max_size() )); release_object( winstation ); clear_error(); reply->next = index;
1
0
0
0
Alexandre Julliard : server: Create window stations objects in a standard directory.
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: 546289dc59e5208cf20789fac02b46d8014d4f84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=546289dc59e5208cf20789fac…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 20 22:02:03 2016 +0900 server: Create window stations objects in a standard directory. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/winstation.c | 25 +++++++++++++++++++++++++ include/wine/server_protocol.h | 6 ++++-- server/directory.c | 10 +++++++++- server/protocol.def | 2 ++ server/request.h | 4 +++- server/trace.c | 2 ++ server/winstation.c | 27 ++++++++++++++++++--------- 7 files changed, 63 insertions(+), 13 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=546289dc59e5208cf2078…
1
0
0
0
Alexandre Julliard : ntdll/tests: Fix a test failure on restricted Windows.
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: 29e0178cf51594240553b292aabe1fb1de3ddf21 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=29e0178cf51594240553b292a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 20 21:36:28 2016 +0900 ntdll/tests: Fix a test failure on restricted Windows. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/om.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index a736c1e..58333d1 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -516,9 +516,13 @@ static void test_name_limits(void) } str.Length = sizeof(registryW) + 256 * sizeof(WCHAR); status = pNtCreateKey( &ret, GENERIC_ALL, &attr, 0, NULL, 0, NULL ); - ok( status == STATUS_SUCCESS, "%u: NtCreateKey failed %x\n", str.Length, status ); - pNtDeleteKey( ret ); - pNtClose( ret ); + ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED, + "%u: NtCreateKey failed %x\n", str.Length, status ); + if (!status) + { + pNtDeleteKey( ret ); + pNtClose( ret ); + } str.Length++; status = pNtCreateKey( &ret, GENERIC_ALL, &attr, 0, NULL, 0, NULL ); ok( status == STATUS_OBJECT_NAME_INVALID ||
1
0
0
0
Piotr Caban : msvcr110: Add _W_Gettnames implementation.
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: 59ed8c593c8c5d7d7de2ecde6a283d9d4276661f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59ed8c593c8c5d7d7de2ecde6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jan 20 11:42:14 2016 +0100 msvcr110: Add _W_Gettnames implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-crt-time-l1-1-0.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120/tests/msvcr120.c | 53 ++++++++++++++++++++++ dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcrt/locale.c | 8 ++++ dlls/ucrtbase/ucrtbase.spec | 2 +- 7 files changed, 66 insertions(+), 5 deletions(-) diff --git a/dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec b/dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec index 80b79cb..2939b95 100644 --- a/dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec +++ b/dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec @@ -4,7 +4,7 @@ @ cdecl _Strftime(str long str ptr ptr) ucrtbase._Strftime @ cdecl _W_Getdays() ucrtbase._W_Getdays @ cdecl _W_Getmonths() ucrtbase._W_Getmonths -@ stub _W_Gettnames +@ cdecl _W_Gettnames() ucrtbase._W_Gettnames @ stub _Wcsftime @ cdecl __daylight() ucrtbase.__daylight @ cdecl __dstbias() ucrtbase.__dstbias diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index dd23c75..c1ee3a2 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -866,7 +866,7 @@ @ stub _Unlock_shared_ptr_spin_lock @ cdecl _W_Getdays() @ cdecl _W_Getmonths() -@ stub _W_Gettnames +@ cdecl _W_Gettnames() @ stub _Wcsftime @ cdecl _XcptFilter(long ptr) @ cdecl __AdjustPointer(ptr ptr) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 461b529..9931820 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -850,7 +850,7 @@ @ cdecl _Strftime(str long str ptr ptr) @ cdecl _W_Getdays() @ cdecl _W_Getmonths() -@ stub _W_Gettnames +@ cdecl _W_Gettnames() @ stub _Wcsftime @ cdecl _XcptFilter(long ptr) @ cdecl __AdjustPointer(ptr ptr) diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index 708fada..aa78c4f 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -24,6 +24,7 @@ #include <windef.h> #include <winbase.h> +#include <winnls.h> #include "wine/test.h" #include <locale.h> @@ -80,6 +81,8 @@ static int (CDECL *p__fdsign)(float); static int (__cdecl *p__dpcomp)(double x, double y); static wchar_t** (CDECL *p____lc_locale_name_func)(void); static unsigned int (CDECL *p__GetConcurrency)(void); +static void* (CDECL *p__W_Gettnames)(void); +static void (CDECL *p_free)(void*); static BOOL init(void) { @@ -100,6 +103,8 @@ static BOOL init(void) p__dpcomp = (void*)GetProcAddress(module, "_dpcomp"); p____lc_locale_name_func = (void*)GetProcAddress(module, "___lc_locale_name_func"); p__GetConcurrency = (void*)GetProcAddress(module,"?_GetConcurrency@details@Concurrency@@YAIXZ"); + p__W_Gettnames = (void*)GetProcAddress(module, "_W_Gettnames"); + p_free = (void*)GetProcAddress(module, "free"); return TRUE; } @@ -269,6 +274,53 @@ static void test__GetConcurrency(void) ok(c == si.dwNumberOfProcessors, "expected %u, got %u\n", si.dwNumberOfProcessors, c); } +static void test__W_Gettnames(void) +{ + static const char *str[] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday", + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", + "January", "February", "March", "April", "May", "June", "July", + "August", "September", "October", "November", "December", + "AM", "PM", "M/d/yyyy" + }; + + struct { + char *str[43]; + int unk[2]; + wchar_t *wstr[43]; + wchar_t *locname; + char data[1]; + } *ret; + int i, size; + WCHAR buf[64]; + + if(!p_setlocale(LC_ALL, "english")) + return; + + ret = p__W_Gettnames(); + size = ret->str[0]-(char*)ret; + if(sizeof(void*) == 8) + ok(size==0x2c0, "structure size: %x\n", size); + else + ok(size==0x164, "structure size: %x\n", size); + + for(i=0; i<sizeof(str)/sizeof(*str); i++) { + ok(!strcmp(ret->str[i], str[i]), "ret->str[%d] = %s, expected %s\n", + i, ret->str[i], str[i]); + + MultiByteToWideChar(CP_ACP, 0, str[i], strlen(str[i])+1, + buf, sizeof(buf)/sizeof(*buf)); + ok(!lstrcmpW(ret->wstr[i], buf), "ret->wstr[%d] = %s, expected %s\n", + i, wine_dbgstr_w(ret->wstr[i]), wine_dbgstr_w(buf)); + } + p_free(ret); + + p_setlocale(LC_ALL, "C"); +} + START_TEST(msvcr120) { if (!init()) return; @@ -277,4 +329,5 @@ START_TEST(msvcr120) test__dpcomp(); test____lc_locale_name_func(); test__GetConcurrency(); + test__W_Gettnames(); } diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 425c839..50066ed 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -844,7 +844,7 @@ @ cdecl _Strftime(str long str ptr ptr) msvcr120._Strftime @ cdecl _W_Getdays() msvcr120._W_Getdays @ cdecl _W_Getmonths() msvcr120._W_Getmonths -@ stub _W_Gettnames +@ cdecl _W_Gettnames() msvcr120._W_Gettnames @ stub _Wcsftime @ cdecl _XcptFilter(long ptr) msvcr120._XcptFilter @ cdecl __AdjustPointer(ptr ptr) msvcr120.__AdjustPointer diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index e1a0fbe..a1551c2 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -580,6 +580,14 @@ void* CDECL _Gettnames(void) } /********************************************************************* + * _W_Gettnames (MSVCR110.@) + */ +void* CDECL _W_Gettnames(void) +{ + return _Gettnames(); +} + +/********************************************************************* * __crtLCMapStringA (MSVCRT.@) */ int CDECL __crtLCMapStringA( diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index e59e26f..e809596 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -43,7 +43,7 @@ @ cdecl _Strftime(str long str ptr ptr) @ cdecl _W_Getdays() @ cdecl _W_Getmonths() -@ stub _W_Gettnames +@ cdecl _W_Gettnames() @ stub _Wcsftime @ cdecl __AdjustPointer(ptr ptr) @ stub __BuildCatchObject
1
0
0
0
Piotr Caban : msvcr110: Fix __lc_time_data definition.
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: d4450b9195bd2209f5a874b31e2e82420cf5dd38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d4450b9195bd2209f5a874b31…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jan 20 11:42:08 2016 +0100 msvcr110: Fix __lc_time_data definition. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/locale.c | 9 +++++++++ dlls/msvcrt/msvcrt.h | 5 +++++ dlls/msvcrt/time.c | 22 ++++++++++++++++++---- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index b00bc78..e1a0fbe 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -1528,6 +1528,9 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category, size += ret*sizeof(MSVCRT_wchar_t); } } +#if _MSVCR_VER >= 110 + size += LCIDToLocaleName(lcid[MSVCRT_LC_TIME], NULL, 0, 0)*sizeof(MSVCRT_wchar_t); +#endif locinfo->lc_time_curr = MSVCRT_malloc(size); if(!locinfo->lc_time_curr) { @@ -1568,7 +1571,13 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category, (MSVCRT_wchar_t*)&locinfo->lc_time_curr->data[ret], size-ret)*sizeof(MSVCRT_wchar_t); } } +#if _MSVCR_VER >= 110 + locinfo->lc_time_curr->locname = (MSVCRT_wchar_t*)&locinfo->lc_time_curr->data[ret]; + LCIDToLocaleName(lcid[MSVCRT_LC_TIME], locinfo->lc_time_curr->locname, + (size-ret)/sizeof(MSVCRT_wchar_t), 0); +#else locinfo->lc_time_curr->lcid = lcid[MSVCRT_LC_TIME]; +#endif } return locinfo; diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index e30e675..aff1741 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -132,7 +132,9 @@ typedef struct { char *time; } names; } str; +#if _MSVCR_VER < 110 LCID lcid; +#endif int unk[2]; union { MSVCRT_wchar_t *wstr[43]; @@ -148,6 +150,9 @@ typedef struct { MSVCRT_wchar_t *time; } names; } wstr; +#if _MSVCR_VER >= 110 + MSVCRT_wchar_t *locname; +#endif char data[1]; } MSVCRT___lc_time_data; diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 7fed3b3..50a27ec 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -946,6 +946,7 @@ static inline BOOL strftime_date(char *str, MSVCRT_size_t *pos, MSVCRT_size_t ma char *format; SYSTEMTIME st; MSVCRT_size_t ret; + LCID lcid; st.wYear = mstm->tm_year + 1900; st.wMonth = mstm->tm_mon + 1; @@ -956,10 +957,16 @@ static inline BOOL strftime_date(char *str, MSVCRT_size_t *pos, MSVCRT_size_t ma st.wSecond = mstm->tm_sec; st.wMilliseconds = 0; +#if _MSVCR_VER < 110 + lcid = time_data->lcid; +#else + lcid = LocaleNameToLCID(time_data->locname, 0); +#endif + format = alternate ? time_data->str.names.date : time_data->str.names.short_date; - ret = GetDateFormatA(time_data->lcid, 0, &st, format, NULL, 0); + ret = GetDateFormatA(lcid, 0, &st, format, NULL, 0); if(ret && ret<max-*pos) - ret = GetDateFormatA(time_data->lcid, 0, &st, format, str+*pos, max-*pos); + ret = GetDateFormatA(lcid, 0, &st, format, str+*pos, max-*pos); if(!ret) { *str = 0; *MSVCRT__errno() = MSVCRT_EINVAL; @@ -978,6 +985,7 @@ static inline BOOL strftime_time(char *str, MSVCRT_size_t *pos, MSVCRT_size_t ma { SYSTEMTIME st; MSVCRT_size_t ret; + LCID lcid; st.wYear = mstm->tm_year + 1900; st.wMonth = mstm->tm_mon + 1; @@ -988,9 +996,15 @@ static inline BOOL strftime_time(char *str, MSVCRT_size_t *pos, MSVCRT_size_t ma st.wSecond = mstm->tm_sec; st.wMilliseconds = 0; - ret = GetTimeFormatA(time_data->lcid, 0, &st, time_data->str.names.time, NULL, 0); +#if _MSVCR_VER < 110 + lcid = time_data->lcid; +#else + lcid = LocaleNameToLCID(time_data->locname, 0); +#endif + + ret = GetTimeFormatA(lcid, 0, &st, time_data->str.names.time, NULL, 0); if(ret && ret<max-*pos) - ret = GetTimeFormatA(time_data->lcid, 0, &st, time_data->str.names.time, + ret = GetTimeFormatA(lcid, 0, &st, time_data->str.names.time, str+*pos, max-*pos); if(!ret) { *str = 0;
1
0
0
0
Piotr Caban : msvcrt: Fix size test of structure returned by _Gettnames.
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: 9189eb2208ac4129ada43c6bdec832ea0b961a0e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9189eb2208ac4129ada43c6bd…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jan 20 11:42:03 2016 +0100 msvcrt: Fix size test of structure returned by _Gettnames. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/tests/locale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/tests/locale.c b/dlls/msvcrt/tests/locale.c index 65bb74b..f4d86bc 100644 --- a/dlls/msvcrt/tests/locale.c +++ b/dlls/msvcrt/tests/locale.c @@ -671,12 +671,12 @@ static void test__Gettnames(void) return; ret = _Gettnames(); - size = ret->data-(char*)ret; + size = ret->str[0]-(char*)ret; /* Newer version of the structure stores both ascii and unicode strings. * Unicode strings are only initialized on Windows 7 */ if(sizeof(void*) == 8) - ok(size==0x2c0 || broken(size==0x170), "structure size: %x\n", size); + ok(size==0x2c0 || broken(size==0x168), "structure size: %x\n", size); else ok(size==0x164 || broken(size==0xb8), "structure size: %x\n", size);
1
0
0
0
Nikolay Sivov : d2d1: Don't update target dpi if only one SetDpi() argument is zero.
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: c05dd9e11f74d16d568e5a59cbc2459ba658e8ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c05dd9e11f74d16d568e5a59c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jan 20 00:43:33 2016 +0300 d2d1: Don't update target dpi if only one SetDpi() argument is zero. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/render_target.c | 2 ++ dlls/d2d1/tests/d2d1.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/dlls/d2d1/render_target.c b/dlls/d2d1/render_target.c index 21c3125..fba1738 100644 --- a/dlls/d2d1/render_target.c +++ b/dlls/d2d1/render_target.c @@ -1436,6 +1436,8 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_SetDpi(ID2D1RenderTarget *if dpi_x = 96.0f; dpi_y = 96.0f; } + else if (dpi_x == 0.0f || dpi_y == 0.0f) + return; render_target->dpi_x = dpi_x; render_target->dpi_y = dpi_y; diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index b721c26..7c554d2 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -587,6 +587,19 @@ static void test_clip(void) ok(dpi_x == 96.0f, "Got unexpected dpi_x %.8e.\n", dpi_x); ok(dpi_y == 96.0f, "Got unexpected dpi_y %.8e.\n", dpi_y); + ID2D1RenderTarget_SetDpi(rt, 192.0f, 192.0f); + ID2D1RenderTarget_SetDpi(rt, 0.0f, 96.0f); + ID2D1RenderTarget_GetDpi(rt, &dpi_x, &dpi_y); + ok(dpi_x == 192.0f, "Got unexpected dpi_x %.8e.\n", dpi_x); + ok(dpi_y == 192.0f, "Got unexpected dpi_y %.8e.\n", dpi_y); + + ID2D1RenderTarget_SetDpi(rt, 96.0f, 0.0f); + ID2D1RenderTarget_GetDpi(rt, &dpi_x, &dpi_y); + ok(dpi_x == 192.0f, "Got unexpected dpi_x %.8e.\n", dpi_x); + ok(dpi_y == 192.0f, "Got unexpected dpi_y %.8e.\n", dpi_y); + + ID2D1RenderTarget_SetDpi(rt, 96.0f, 96.0f); + /* Transformations apply to clip rects, the effective clip rect is the * (axis-aligned) bounding box of the transformed clip rect. */ set_point(&point, 320.0f, 240.0f);
1
0
0
0
Józef Kucia : d3d10core/tests: Extend test for ID3D10Device::UpdateSubresource().
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: f26e13f38f68716fead0d363d62db686e41571b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f26e13f38f68716fead0d363d…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jan 19 22:28:07 2016 +0100 d3d10core/tests: Extend test for ID3D10Device::UpdateSubresource(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d10core/tests/device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index 5d2b4c4..ba35e0d 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -4582,6 +4582,9 @@ static void test_update_subresource(void) set_box(&box, 4, 4, 0, 3, 1, 1); ID3D10Device_UpdateSubresource(device, (ID3D10Resource *)texture, 0, &box, bitmap_data, sizeof(*bitmap_data), 0); + set_box(&box, 0, 0, 0, 4, 4, 0); + ID3D10Device_UpdateSubresource(device, (ID3D10Resource *)texture, 0, &box, + bitmap_data, 4 * sizeof(*bitmap_data), 0); ID3D10Device_Draw(device, 4, 0); get_texture_readback(backbuffer, &rb); for (i = 0; i < 4; ++i)
1
0
0
0
Józef Kucia : d3d11/tests: Extend test for ID3D11DeviceContext::UpdateSubresource().
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: 8330635c93c392b4f1e12c1127dd5682cb6c1ae0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8330635c93c392b4f1e12c112…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jan 19 22:28:06 2016 +0100 d3d11/tests: Extend test for ID3D11DeviceContext::UpdateSubresource(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 5c6efaf..cb3f185 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -4227,6 +4227,9 @@ static void test_update_subresource(void) set_box(&box, 4, 4, 0, 3, 1, 1); ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)texture, 0, &box, bitmap_data, sizeof(*bitmap_data), 0); + set_box(&box, 0, 0, 0, 4, 4, 0); + ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)texture, 0, &box, + bitmap_data, 4 * sizeof(*bitmap_data), 0); ID3D11DeviceContext_Draw(context, 4, 0); get_texture_readback(backbuffer, &rb); for (i = 0; i < 4; ++i)
1
0
0
0
Józef Kucia : wined3d: Do not update surface when empty box is passed.
by Alexandre Julliard
20 Jan '16
20 Jan '16
Module: wine Branch: master Commit: 3d7c666005d5aac1c810dcf1fc82498df8d9b91d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d7c666005d5aac1c810dcf1f…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jan 19 22:28:05 2016 +0100 wined3d: Do not update surface when empty box is passed. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7c5a4c2..d308083 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4070,7 +4070,8 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str if (box) { if (box->left >= box->right || box->right > sub_resource->width - || box->top >= box->bottom || box->bottom > sub_resource->height) + || box->top >= box->bottom || box->bottom > sub_resource->height + || box->front >= box->back) { WARN("Invalid box (%u, %u, %u)->(%u, %u, %u) specified.\n", box->left, box->top, box->front, box->right, box->bottom, box->back);
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
63
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
Results per page:
10
25
50
100
200