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
April 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
898 discussions
Start a n
N
ew thread
Hans Leidekker : msi: Implement the UnregisterClassInfo standard action.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 843968c056555109f44567bea784683cb3e5c5a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=843968c056555109f44567bea…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 10:37:50 2010 +0200 msi: Implement the UnregisterClassInfo standard action. --- dlls/msi/action.c | 8 --- dlls/msi/classes.c | 167 ++++++++++++++++++++++++++++++++++++---------------- dlls/msi/msipriv.h | 9 +++ 3 files changed, 124 insertions(+), 60 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=843968c056555109f4456…
1
0
0
0
Alexandre Julliard : server: Disallow all operations on deleted registry keys.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 6ebc627996292fe598e5173be4bc774f9001720b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ebc627996292fe598e5173be…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 2 12:43:31 2010 +0200 server: Disallow all operations on deleted registry keys. --- dlls/advapi32/tests/registry.c | 19 +++++++++++++++---- server/registry.c | 33 +++++++++++++-------------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index ea036e8..30dda7e 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1924,16 +1924,24 @@ static void test_deleted_key(void) delete_key( hkey_main ); - val_count = 20; + val_count = sizeof(value); type = 0; res = RegEnumValueA( hkey, 0, value, &val_count, NULL, &type, 0, 0 ); - todo_wine ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + + res = RegEnumKeyA( hkey, 0, value, sizeof(value) ); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + + val_count = sizeof(value); + type = 0; + res = RegQueryValueExA( hkey, "test", NULL, &type, (BYTE *)value, &val_count ); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); res = RegSetValueExA( hkey, "test", 0, REG_SZ, (const BYTE*)"value", 6); - todo_wine ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); res = RegOpenKeyA( hkey, "test", &hkey2 ); - todo_wine ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); if (res == 0) RegCloseKey( hkey2 ); @@ -1942,6 +1950,9 @@ static void test_deleted_key(void) if (res == 0) RegCloseKey( hkey2 ); + res = RegFlushKey( hkey ); + ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); + RegCloseKey( hkey ); setup_main_key(); diff --git a/server/registry.c b/server/registry.c index 574f2e4..f4dbf8e 100644 --- a/server/registry.c +++ b/server/registry.c @@ -712,12 +712,6 @@ static struct key *create_key( struct key *key, const struct unicode_str *name, int index; struct unicode_str token, next; - if (key->flags & KEY_DELETED) /* we cannot create a subkey under a deleted key */ - { - set_error( STATUS_KEY_DELETED ); - return NULL; - } - *created = 0; if (!(key = open_key_prefix( key, name, access, &token, &index ))) return NULL; @@ -902,7 +896,7 @@ static void enum_key( const struct key *key, int index, int info_class, static int delete_key( struct key *key, int recurse ) { int index; - struct key *parent; + struct key *parent = key->parent; /* must find parent and index */ if (key == root_key) @@ -910,11 +904,7 @@ static int delete_key( struct key *key, int recurse ) set_error( STATUS_ACCESS_DENIED ); return -1; } - if (!(parent = key->parent) || (key->flags & KEY_DELETED)) - { - set_error( STATUS_KEY_DELETED ); - return -1; - } + assert( parent ); while (recurse && (key->last_subkey>=0)) if (0 > delete_key(key->subkeys[key->last_subkey], 1)) @@ -1165,16 +1155,24 @@ static void delete_value( struct key *key, const struct unicode_str *name ) } /* get the registry key corresponding to an hkey handle */ -static inline struct key *get_hkey_obj( obj_handle_t hkey, unsigned int access ) +static struct key *get_hkey_obj( obj_handle_t hkey, unsigned int access ) { - return (struct key *)get_handle_obj( current->process, hkey, access, &key_ops ); + struct key *key = (struct key *)get_handle_obj( current->process, hkey, access, &key_ops ); + + if (key && key->flags & KEY_DELETED) + { + set_error( STATUS_KEY_DELETED ); + release_object( key ); + key = NULL; + } + return key; } /* get the registry key corresponding to a parent key handle */ static inline struct key *get_parent_hkey_obj( obj_handle_t hkey ) { if (!hkey) return (struct key *)grab_object( root_key ); - return (struct key *)get_handle_obj( current->process, hkey, 0, &key_ops ); + return get_hkey_obj( hkey, 0 ); } /* read a line from the input file */ @@ -1698,11 +1696,6 @@ static void save_registry( struct key *key, obj_handle_t handle ) struct file *file; int fd; - if (key->flags & KEY_DELETED) - { - set_error( STATUS_KEY_DELETED ); - return; - } if (!(file = get_file_obj( current->process, handle, FILE_WRITE_DATA ))) return; fd = dup( get_file_unix_fd( file ) ); release_object( file );
1
0
0
0
Alexandre Julliard : advapi32: Add support for the KEY_WOW64_32KEY flag in RegOpenKey on 64-bit.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 21da080dbd71ed5b5d00ed9dcd4370c771edf2a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21da080dbd71ed5b5d00ed9dc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 2 12:14:21 2010 +0200 advapi32: Add support for the KEY_WOW64_32KEY flag in RegOpenKey on 64-bit. --- dlls/advapi32/registry.c | 53 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 51 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index ba9d9a7..abaf09d 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -174,6 +174,55 @@ static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES return status; } +/* wrapper for NtOpenKey to handle Wow6432 nodes */ +static NTSTATUS open_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr ) +{ + NTSTATUS status; + BOOL force_wow32 = is_win64 && (access & KEY_WOW64_32KEY); + HANDLE subkey, root = attr->RootDirectory; + WCHAR *buffer = attr->ObjectName->Buffer; + DWORD attrs, pos = 0, i = 0, len = attr->ObjectName->Length / sizeof(WCHAR); + UNICODE_STRING str; + + if (!force_wow32) return NtOpenKey( (HANDLE *)retkey, access, attr ); + + if (len && buffer[0] == '\\') return STATUS_OBJECT_PATH_INVALID; + while (i < len && buffer[i] != '\\') i++; + attrs = attr->Attributes; + attr->Attributes &= ~OBJ_OPENLINK; + attr->ObjectName = &str; + + while (i < len) + { + str.Buffer = buffer + pos; + str.Length = (i - pos) * sizeof(WCHAR); + if (force_wow32 && pos) + { + if (is_wow6432node( &str )) force_wow32 = FALSE; + else if ((subkey = open_wow6432node( attr->RootDirectory, &str ))) + { + if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); + attr->RootDirectory = subkey; + force_wow32 = FALSE; + } + } + status = NtOpenKey( &subkey, access, attr ); + if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); + if (status) return status; + attr->RootDirectory = subkey; + while (i < len && buffer[i] == '\\') i++; + pos = i; + while (i < len && buffer[i] != '\\') i++; + } + str.Buffer = buffer + pos; + str.Length = (i - pos) * sizeof(WCHAR); + attr->Attributes = attrs; + status = NtOpenKey( (PHANDLE)retkey, access, attr ); + if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); + return status; + +} + /* create one of the HKEY_* special root keys */ static HKEY create_special_root_hkey( HKEY hkey, DWORD access ) { @@ -404,7 +453,7 @@ LSTATUS WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD options, REGSAM acc attr.SecurityQualityOfService = NULL; if (options & REG_OPTION_OPEN_LINK) attr.Attributes |= OBJ_OPENLINK; RtlInitUnicodeString( &nameW, name ); - return RtlNtStatusToDosError( NtOpenKey( (PHANDLE)retkey, access, &attr ) ); + return RtlNtStatusToDosError( open_key( retkey, access, &attr ) ); } @@ -455,7 +504,7 @@ LSTATUS WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD options, REGSAM acce if (!(status = RtlAnsiStringToUnicodeString( &NtCurrentTeb()->StaticUnicodeString, &nameA, FALSE ))) { - status = NtOpenKey( (PHANDLE)retkey, access, &attr ); + status = open_key( retkey, access, &attr ); } return RtlNtStatusToDosError( status ); }
1
0
0
0
Alexandre Julliard : advapi32: Add support for the KEY_WOW64_32KEY flag in RegCreateKey on 64-bit.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 68a5c34731253e5965615b0b1cf920b63938e035 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68a5c34731253e5965615b0b1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 2 11:51:15 2010 +0200 advapi32: Add support for the KEY_WOW64_32KEY flag in RegCreateKey on 64-bit. --- dlls/advapi32/registry.c | 71 ++++++++++++++++++++++++++++++++++------ dlls/advapi32/tests/registry.c | 4 ++- 2 files changed, 64 insertions(+), 11 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index 9266d3f..ba9d9a7 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -78,6 +78,7 @@ static const WCHAR * const root_key_names[NB_SPECIAL_ROOT_KEYS] = name_DYN_DATA }; +static const int is_win64 = (sizeof(void *) > sizeof(int)); /* check if value type needs string conversion (Ansi<->Unicode) */ static inline int is_string( DWORD type ) @@ -91,34 +92,84 @@ static inline int is_version_nt(void) return !(GetVersion() & 0x80000000); } +static BOOL is_wow6432node( const UNICODE_STRING *name ) +{ + static const WCHAR wow6432nodeW[] = {'W','o','w','6','4','3','2','N','o','d','e'}; + + return (name->Length == sizeof(wow6432nodeW) && + !memicmpW( name->Buffer, wow6432nodeW, sizeof(wow6432nodeW)/sizeof(WCHAR) )); +} + +/* open the Wow6432Node subkey of the specified key */ +static HANDLE open_wow6432node( HANDLE key, const UNICODE_STRING *name ) +{ + static const WCHAR wow6432nodeW[] = {'W','o','w','6','4','3','2','N','o','d','e',0}; + OBJECT_ATTRIBUTES attr; + UNICODE_STRING nameW; + HANDLE ret; + + attr.Length = sizeof(attr); + attr.RootDirectory = key; + attr.ObjectName = &nameW; + attr.Attributes = 0; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + RtlInitUnicodeString( &nameW, wow6432nodeW ); + if (NtOpenKey( &ret, MAXIMUM_ALLOWED, &attr )) ret = 0; + return ret; +} + /* wrapper for NtCreateKey that creates the key recursively if necessary */ static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr, const UNICODE_STRING *class, ULONG options, PULONG dispos ) { - NTSTATUS status = NtCreateKey( (HANDLE *)retkey, access, attr, 0, class, options, dispos ); + BOOL force_wow32 = is_win64 && (access & KEY_WOW64_32KEY); + NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND; + + if (!force_wow32) status = NtCreateKey( (HANDLE *)retkey, access, attr, 0, class, options, dispos ); if (status == STATUS_OBJECT_NAME_NOT_FOUND) { - DWORD attrs, i = 0, len = attr->ObjectName->Length / sizeof(WCHAR); + HANDLE subkey, root = attr->RootDirectory; + WCHAR *buffer = attr->ObjectName->Buffer; + DWORD attrs, pos = 0, i = 0, len = attr->ObjectName->Length / sizeof(WCHAR); + UNICODE_STRING str; + + while (i < len && buffer[i] != '\\') i++; + if (i == len && !force_wow32) return status; - while (i < len && attr->ObjectName->Buffer[i] != '\\') i++; - if (i == len) return status; attrs = attr->Attributes; attr->Attributes &= ~OBJ_OPENLINK; + attr->ObjectName = &str; while (i < len) { - attr->ObjectName->Length = i * sizeof(WCHAR); - status = NtCreateKey( (HANDLE *)retkey, access, attr, 0, class, + str.Buffer = buffer + pos; + str.Length = (i - pos) * sizeof(WCHAR); + if (force_wow32 && pos) + { + if (is_wow6432node( &str )) force_wow32 = FALSE; + else if ((subkey = open_wow6432node( attr->RootDirectory, &str ))) + { + if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); + attr->RootDirectory = subkey; + force_wow32 = FALSE; + } + } + status = NtCreateKey( &subkey, access, attr, 0, class, options & ~REG_OPTION_CREATE_LINK, dispos ); + if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); if (status) return status; - NtClose( *retkey ); - while (i < len && attr->ObjectName->Buffer[i] == '\\') i++; - while (i < len && attr->ObjectName->Buffer[i] != '\\') i++; + attr->RootDirectory = subkey; + while (i < len && buffer[i] == '\\') i++; + pos = i; + while (i < len && buffer[i] != '\\') i++; } + str.Buffer = buffer + pos; + str.Length = (i - pos) * sizeof(WCHAR); attr->Attributes = attrs; - attr->ObjectName->Length = len * sizeof(WCHAR); status = NtCreateKey( (PHANDLE)retkey, access, attr, 0, class, options, dispos ); + if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); } return status; } diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 63ed984..ea036e8 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1862,7 +1862,9 @@ static void test_redirection(void) ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); check_key_value( key, "Winetest", 0, ptr_size ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : ptr_size ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); + dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY ); + if (ptr_size == 32) ok( dw == 32, "wrong value %u\n", dw ); + else todo_wine ok( dw == 32, "wrong value %u\n", dw ); RegCloseKey( key ); if (ptr_size == 32)
1
0
0
0
Alexandre Julliard : advapi32: Don' t use the static Unicode buffer for value names since they can be larger than MAX_PATH .
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: acc41b50d123d693041b7feaa763ed4c227f9b94 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=acc41b50d123d693041b7feaa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 2 11:50:12 2010 +0200 advapi32: Don't use the static Unicode buffer for value names since they can be larger than MAX_PATH. --- dlls/advapi32/registry.c | 31 ++++++++++++++++++------------- dlls/advapi32/tests/registry.c | 3 ++- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index dd3f516..9266d3f 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -1103,6 +1103,7 @@ LSTATUS WINAPI RegSetValueExA( HKEY hkey, LPCSTR name, DWORD reserved, DWORD typ CONST BYTE *data, DWORD count ) { ANSI_STRING nameA; + UNICODE_STRING nameW; WCHAR *dataW = NULL; NTSTATUS status; @@ -1133,10 +1134,10 @@ LSTATUS WINAPI RegSetValueExA( HKEY hkey, LPCSTR name, DWORD reserved, DWORD typ } RtlInitAnsiString( &nameA, name ); - if (!(status = RtlAnsiStringToUnicodeString( &NtCurrentTeb()->StaticUnicodeString, - &nameA, FALSE ))) + if (!(status = RtlAnsiStringToUnicodeString( &nameW, &nameA, TRUE ))) { - status = NtSetValueKey( hkey, &NtCurrentTeb()->StaticUnicodeString, 0, type, data, count ); + status = NtSetValueKey( hkey, &nameW, 0, type, data, count ); + RtlFreeUnicodeString( &nameW ); } HeapFree( GetProcessHeap(), 0, dataW ); return RtlNtStatusToDosError( status ); @@ -1305,6 +1306,7 @@ LSTATUS WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWO { NTSTATUS status; ANSI_STRING nameA; + UNICODE_STRING nameW; DWORD total_size, datalen = 0; char buffer[256], *buf_ptr = buffer; KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; @@ -1323,12 +1325,11 @@ LSTATUS WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWO if (type) *type = REG_NONE; RtlInitAnsiString( &nameA, name ); - if ((status = RtlAnsiStringToUnicodeString( &NtCurrentTeb()->StaticUnicodeString, - &nameA, FALSE ))) + if ((status = RtlAnsiStringToUnicodeString( &nameW, &nameA, TRUE ))) return RtlNtStatusToDosError(status); - status = NtQueryValueKey( hkey, &NtCurrentTeb()->StaticUnicodeString, - KeyValuePartialInformation, buffer, sizeof(buffer), &total_size ); + status = NtQueryValueKey( hkey, &nameW, KeyValuePartialInformation, + buffer, sizeof(buffer), &total_size ); if (status && status != STATUS_BUFFER_OVERFLOW) goto done; /* we need to fetch the contents for a string type even if not requested, @@ -1345,8 +1346,8 @@ LSTATUS WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWO goto done; } info = (KEY_VALUE_PARTIAL_INFORMATION *)buf_ptr; - status = NtQueryValueKey( hkey, &NtCurrentTeb()->StaticUnicodeString, - KeyValuePartialInformation, buf_ptr, total_size, &total_size ); + status = NtQueryValueKey( hkey, &nameW, KeyValuePartialInformation, + buf_ptr, total_size, &total_size ); } if (status) goto done; @@ -1384,6 +1385,7 @@ LSTATUS WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWO done: if (buf_ptr != buffer) HeapFree( GetProcessHeap(), 0, buf_ptr ); + RtlFreeUnicodeString( &nameW ); return RtlNtStatusToDosError(status); } @@ -1955,15 +1957,18 @@ LSTATUS WINAPI RegDeleteValueW( HKEY hkey, LPCWSTR name ) */ LSTATUS WINAPI RegDeleteValueA( HKEY hkey, LPCSTR name ) { - STRING nameA; + ANSI_STRING nameA; + UNICODE_STRING nameW; NTSTATUS status; if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; RtlInitAnsiString( &nameA, name ); - if (!(status = RtlAnsiStringToUnicodeString( &NtCurrentTeb()->StaticUnicodeString, - &nameA, FALSE ))) - status = NtDeleteValueKey( hkey, &NtCurrentTeb()->StaticUnicodeString ); + if (!(status = RtlAnsiStringToUnicodeString( &nameW, &nameA, TRUE ))) + { + status = NtDeleteValueKey( hkey, &nameW ); + RtlFreeUnicodeString( &nameW ); + } return RtlNtStatusToDosError( status ); } diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index d0ef19e..63ed984 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1968,7 +1968,8 @@ static void test_delete_value(void) memset(longname, 'a', 400); longname[400] = 0; res = RegDeleteValueA( hkey_main, longname ); - todo_wine ok(res == ERROR_FILE_NOT_FOUND, "expect ERROR_FILE_NOT_FOUND, got %i\n", res); + ok(res == ERROR_FILE_NOT_FOUND || broken(res == ERROR_MORE_DATA), /* nt4, win2k */ + "expect ERROR_FILE_NOT_FOUND, got %i\n", res); } START_TEST(registry)
1
0
0
0
Alexandre Julliard : server: Update the registry key and value name length limits to the now documented values .
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 935cc7987df61352a2cc51b83e839551e9720fb2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=935cc7987df61352a2cc51b83…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 2 11:48:14 2010 +0200 server: Update the registry key and value name length limits to the now documented values. --- dlls/ntdll/reg.c | 12 +++++++----- server/registry.c | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 3bee588..d68f154 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -42,8 +42,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg); -/* maximum length of a key/value name in bytes (without terminating null) */ -#define MAX_NAME_LENGTH ((MAX_PATH-1) * sizeof(WCHAR)) +/* maximum length of a key name in bytes (without terminating null) */ +#define MAX_NAME_LENGTH (255 * sizeof(WCHAR)) +/* maximum length of a value name in bytes (without terminating null) */ +#define MAX_VALUE_LENGTH (16383 * sizeof(WCHAR)) /****************************************************************************** * NtCreateKey [NTDLL.@] @@ -188,7 +190,7 @@ NTSTATUS WINAPI NtDeleteValueKey( HANDLE hkey, const UNICODE_STRING *name ) NTSTATUS ret; TRACE( "(%p,%s)\n", hkey, debugstr_us(name) ); - if (name->Length > MAX_NAME_LENGTH) return STATUS_BUFFER_OVERFLOW; + if (name->Length > MAX_VALUE_LENGTH) return STATUS_BUFFER_OVERFLOW; SERVER_START_REQ( delete_key_value ) { @@ -481,7 +483,7 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name, TRACE( "(%p,%s,%d,%p,%d)\n", handle, debugstr_us(name), info_class, info, length ); - if (name->Length > MAX_NAME_LENGTH) return STATUS_BUFFER_OVERFLOW; + if (name->Length > MAX_VALUE_LENGTH) return STATUS_BUFFER_OVERFLOW; /* compute the length we want to retrieve */ switch(info_class) @@ -769,7 +771,7 @@ NTSTATUS WINAPI NtSetValueKey( HANDLE hkey, const UNICODE_STRING *name, ULONG Ti TRACE( "(%p,%s,%d,%p,%d)\n", hkey, debugstr_us(name), type, data, count ); - if (name->Length > MAX_NAME_LENGTH) return STATUS_BUFFER_OVERFLOW; + if (name->Length > MAX_VALUE_LENGTH) return STATUS_BUFFER_OVERFLOW; SERVER_START_REQ( set_key_value ) { diff --git a/server/registry.c b/server/registry.c index 93d42c9..574f2e4 100644 --- a/server/registry.c +++ b/server/registry.c @@ -100,8 +100,8 @@ struct key_value #define MIN_SUBKEYS 8 /* min. number of allocated subkeys per key */ #define MIN_VALUES 8 /* min. number of allocated values per key */ -#define MAX_NAME_LEN MAX_PATH /* max. length of a key name */ -#define MAX_VALUE_LEN MAX_PATH /* max. length of a value name */ +#define MAX_NAME_LEN 255 /* max. length of a key name */ +#define MAX_VALUE_LEN 16383 /* max. length of a value name */ /* the root of the registry tree */ static struct key *root_key;
1
0
0
0
Christian Costa : d3dx9_36: Improve FIXMEs and TRACEs for font.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: b3ad91f699fc334bb4f6ced1de9b2e354ba183c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3ad91f699fc334bb4f6ced1d…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Fri Apr 2 08:54:54 2010 +0200 d3dx9_36: Improve FIXMEs and TRACEs for font. --- dlls/d3dx9_36/font.c | 41 +++++++++++++++++++++++------------------ 1 files changed, 23 insertions(+), 18 deletions(-) diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c index 98b4fe9..1113060 100644 --- a/dlls/d3dx9_36/font.c +++ b/dlls/d3dx9_36/font.c @@ -44,7 +44,7 @@ static ULONG WINAPI ID3DXFontImpl_AddRef(LPD3DXFONT iface) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; ULONG ref=InterlockedIncrement(&This->ref); - TRACE("(%p): AddRef from %d\n", This, ref-1); + TRACE("(%p)->(): AddRef from %d\n", This, ref-1); return ref; } @@ -52,7 +52,8 @@ static ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; ULONG ref=InterlockedDecrement(&This->ref); - TRACE("(%p): ReleaseRef to %d\n", This, ref); + + TRACE("(%p)->(): ReleaseRef to %d\n", This, ref); if(ref==0) { DeleteObject(This->hfont); @@ -66,7 +67,8 @@ static ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface) static HRESULT WINAPI ID3DXFontImpl_GetDevice(LPD3DXFONT iface, LPDIRECT3DDEVICE9 *device) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + + TRACE("(%p)->(%p)\n", This, device); if( !device ) return D3DERR_INVALIDCALL; *device = This->device; @@ -78,7 +80,8 @@ static HRESULT WINAPI ID3DXFontImpl_GetDevice(LPD3DXFONT iface, LPDIRECT3DDEVICE static HRESULT WINAPI ID3DXFontImpl_GetDescA(LPD3DXFONT iface, D3DXFONT_DESCA *desc) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + + TRACE("(%p)->(%p)\n", This, desc); if( !desc ) return D3DERR_INVALIDCALL; memcpy(desc, &This->desc, FIELD_OFFSET(D3DXFONT_DESCA, FaceName)); @@ -90,7 +93,8 @@ static HRESULT WINAPI ID3DXFontImpl_GetDescA(LPD3DXFONT iface, D3DXFONT_DESCA *d static HRESULT WINAPI ID3DXFontImpl_GetDescW(LPD3DXFONT iface, D3DXFONT_DESCW *desc) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + + TRACE("(%p)->(%p)\n", This, desc); if( !desc ) return D3DERR_INVALIDCALL; *desc = This->desc; @@ -101,84 +105,84 @@ static HRESULT WINAPI ID3DXFontImpl_GetDescW(LPD3DXFONT iface, D3DXFONT_DESCW *d static BOOL WINAPI ID3DXFontImpl_GetTextMetricsA(LPD3DXFONT iface, TEXTMETRICA *metrics) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + TRACE("(%p)->(%p)\n", This, metrics); return GetTextMetricsA(This->hdc, metrics); } static BOOL WINAPI ID3DXFontImpl_GetTextMetricsW(LPD3DXFONT iface, TEXTMETRICW *metrics) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + TRACE("(%p)->(%p)\n", This, metrics); return GetTextMetricsW(This->hdc, metrics); } static HDC WINAPI ID3DXFontImpl_GetDC(LPD3DXFONT iface) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + TRACE("(%p)->()\n", This); return This->hdc; } static HRESULT WINAPI ID3DXFontImpl_GetGlyphData(LPD3DXFONT iface, UINT glyph, LPDIRECT3DTEXTURE9 *texture, RECT *blackbox, POINT *cellinc) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%u, %p, %p, %p): stub\n", This, glyph, texture, blackbox, cellinc); return D3D_OK; } static HRESULT WINAPI ID3DXFontImpl_PreloadCharacters(LPD3DXFONT iface, UINT first, UINT last) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%u, %u): stub\n", This, first, last); return D3D_OK; } static HRESULT WINAPI ID3DXFontImpl_PreloadGlyphs(LPD3DXFONT iface, UINT first, UINT last) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%u, %u): stub\n", This, first, last); return D3D_OK; } static HRESULT WINAPI ID3DXFontImpl_PreloadTextA(LPD3DXFONT iface, LPCSTR string, INT count) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%s, %d): stub\n", This, string, count); return D3D_OK; } static HRESULT WINAPI ID3DXFontImpl_PreloadTextW(LPD3DXFONT iface, LPCWSTR string, INT count) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%s, %d): stub\n", This, debugstr_w(string), count); return D3D_OK; } static INT WINAPI ID3DXFontImpl_DrawTextA(LPD3DXFONT iface, LPD3DXSPRITE sprite, LPCSTR string, INT count, LPRECT rect, DWORD format, D3DCOLOR color) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%p, %s, %d, %p, %d, %#x): stub\n", This, sprite, string, count, rect, format, color); return 1; } static INT WINAPI ID3DXFontImpl_DrawTextW(LPD3DXFONT iface, LPD3DXSPRITE sprite, LPCWSTR string, INT count, LPRECT rect, DWORD format, D3DCOLOR color) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%p, %s, %d, %p, %d, %#x): stub\n", This, sprite, debugstr_w(string), count, rect, format, color); return 1; } static HRESULT WINAPI ID3DXFontImpl_OnLostDevice(LPD3DXFONT iface) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(): stub\n", This); return D3D_OK; } static HRESULT WINAPI ID3DXFontImpl_OnResetDevice(LPD3DXFONT iface) { ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(): stub\n", This); return D3D_OK; } @@ -277,7 +281,8 @@ HRESULT WINAPI D3DXCreateFontIndirectW(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_ ID3DXFontImpl *object; IDirect3D9 *d3d; HRESULT hr; - FIXME("stub\n"); + + FIXME("(%p, %p, %p): stub\n", device, desc, font); if( !device || !desc || !font ) return D3DERR_INVALIDCALL;
1
0
0
0
Christian Costa : d3dx9_36: Improve FIXMEs and TRACEs for sprite.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: c1f6857636849f525fc02db2336ae173130411dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c1f6857636849f525fc02db23…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Fri Apr 2 08:54:48 2010 +0200 d3dx9_36: Improve FIXMEs and TRACEs for sprite. --- dlls/d3dx9_36/sprite.c | 34 +++++++++++++++++++++------------- 1 files changed, 21 insertions(+), 13 deletions(-) diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c index ce9938e..1a0038e 100644 --- a/dlls/d3dx9_36/sprite.c +++ b/dlls/d3dx9_36/sprite.c @@ -49,7 +49,7 @@ static ULONG WINAPI ID3DXSpriteImpl_AddRef(LPD3DXSPRITE iface) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; ULONG ref=InterlockedIncrement(&This->ref); - TRACE("(%p): AddRef from %d\n", This, ref-1); + TRACE("(%p)->(): AddRef from %d\n", This, ref-1); return ref; } @@ -57,7 +57,8 @@ static ULONG WINAPI ID3DXSpriteImpl_Release(LPD3DXSPRITE iface) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; ULONG ref=InterlockedDecrement(&This->ref); - TRACE("(%p): ReleaseRef to %d\n", This, ref); + + TRACE("(%p)->(): ReleaseRef to %d\n", This, ref); if(ref==0) { if(This->sprites) { @@ -79,7 +80,8 @@ static ULONG WINAPI ID3DXSpriteImpl_Release(LPD3DXSPRITE iface) static HRESULT WINAPI ID3DXSpriteImpl_GetDevice(LPD3DXSPRITE iface, LPDIRECT3DDEVICE9 *device) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p): relay\n", This); + + TRACE("(%p)->(%p): relay\n", This, device); if(device==NULL) return D3DERR_INVALIDCALL; *device=This->device; @@ -91,7 +93,8 @@ static HRESULT WINAPI ID3DXSpriteImpl_GetDevice(LPD3DXSPRITE iface, LPDIRECT3DDE static HRESULT WINAPI ID3DXSpriteImpl_GetTransform(LPD3DXSPRITE iface, D3DXMATRIX *transform) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p)\n", This); + + TRACE("(%p)->(%p)\n", This, transform); if(transform==NULL) return D3DERR_INVALIDCALL; *transform=This->transform; @@ -102,7 +105,8 @@ static HRESULT WINAPI ID3DXSpriteImpl_GetTransform(LPD3DXSPRITE iface, D3DXMATRI static HRESULT WINAPI ID3DXSpriteImpl_SetTransform(LPD3DXSPRITE iface, CONST D3DXMATRIX *transform) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p)\n", This); + + TRACE("(%p)->(%p)\n", This, transform); if(transform==NULL) return D3DERR_INVALIDCALL; This->transform=*transform; @@ -113,14 +117,14 @@ static HRESULT WINAPI ID3DXSpriteImpl_SetTransform(LPD3DXSPRITE iface, CONST D3D static HRESULT WINAPI ID3DXSpriteImpl_SetWorldViewRH(LPD3DXSPRITE iface, CONST D3DXMATRIX *world, CONST D3DXMATRIX *view) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%p, %p): stub\n", This, world, view); return E_NOTIMPL; } static HRESULT WINAPI ID3DXSpriteImpl_SetWorldViewLH(LPD3DXSPRITE iface, CONST D3DXMATRIX *world, CONST D3DXMATRIX *view) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("(%p)->(%p, %p): stub\n", This, world, view); return E_NOTIMPL; } @@ -269,7 +273,8 @@ static HRESULT WINAPI ID3DXSpriteImpl_Draw(LPD3DXSPRITE iface, LPDIRECT3DTEXTURE { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; D3DSURFACE_DESC texdesc; - TRACE("(%p): relay\n", This); + + TRACE("(%p)->(%p, %p, %p, %p, %#x): relay\n", This, texture, rect, center, position, color); if(texture==NULL) return D3DERR_INVALIDCALL; if(!This->ready) return D3DERR_INVALIDCALL; @@ -328,7 +333,7 @@ static HRESULT WINAPI ID3DXSpriteImpl_Flush(LPD3DXSPRITE iface) ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; SPRITEVERTEX *vertices; int i; - TRACE("(%p): relay\n", This); + TRACE("(%p)->(): relay\n", This); if(!This->ready) return D3DERR_INVALIDCALL; if(!This->sprite_count) return D3D_OK; @@ -395,7 +400,8 @@ static HRESULT WINAPI ID3DXSpriteImpl_Flush(LPD3DXSPRITE iface) static HRESULT WINAPI ID3DXSpriteImpl_End(LPD3DXSPRITE iface) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p): relay\n", This); + + TRACE("(%p)->(): relay\n", This); if(!This->ready) return D3DERR_INVALIDCALL; @@ -412,7 +418,8 @@ static HRESULT WINAPI ID3DXSpriteImpl_End(LPD3DXSPRITE iface) static HRESULT WINAPI ID3DXSpriteImpl_OnLostDevice(LPD3DXSPRITE iface) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p)\n", This); + + TRACE("(%p)->()\n", This); if(This->stateblock) IDirect3DStateBlock9_Release(This->stateblock); if(This->vdecl) IDirect3DVertexDeclaration9_Release(This->vdecl); @@ -430,7 +437,7 @@ static HRESULT WINAPI ID3DXSpriteImpl_OnResetDevice(LPD3DXSPRITE iface) ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; int i; - TRACE("(%p)\n", This); + TRACE("(%p)->()\n", This); for(i=0;i<This->sprite_count;i++) if(This->sprites[i].texture) @@ -471,7 +478,8 @@ HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite) { ID3DXSpriteImpl *object; D3DCAPS9 caps; - TRACE("(void): relay\n"); + + TRACE("(%p, %p): relay\n", device, sprite); if(device==NULL || sprite==NULL) return D3DERR_INVALIDCALL;
1
0
0
0
Christian Costa : d3dx9_36: Implement D3DXCreateLine and add stubbed interface for ID3DXLine + tests.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: cf2315bd52bb24d698397d366d46c1d68c327386 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf2315bd52bb24d698397d366…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Fri Apr 2 08:54:42 2010 +0200 d3dx9_36: Implement D3DXCreateLine and add stubbed interface for ID3DXLine + tests. --- dlls/d3dx9_36/Makefile.in | 1 + dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/line.c | 276 +++++++++++++++++++++++++++++++++++++++ dlls/d3dx9_36/tests/Makefile.in | 1 + dlls/d3dx9_36/tests/line.c | 76 +++++++++++ 5 files changed, 355 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cf2315bd52bb24d698397…
1
0
0
0
Stefan Leichter : ws2_32: Partly implement level IPPROTO_IPV6 of getsockopt .
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 89aaf74f1f214cc8bbc63aa99fc4390b2ed7e9f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89aaf74f1f214cc8bbc63aa99…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Thu Apr 1 23:50:54 2010 +0200 ws2_32: Partly implement level IPPROTO_IPV6 of getsockopt. --- dlls/ws2_32/socket.c | 30 +++++++++++++++++++++++++++++- 1 files changed, 29 insertions(+), 1 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 3f87eb6..0918779 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2317,7 +2317,35 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, return SOCKET_ERROR; case WS_IPPROTO_IPV6: - FIXME("IPPROTO_IPV6 unimplemented (optname 0x%08x)\n", optname); + switch(optname) + { +#ifdef IPV6_ADD_MEMBERSHIP + case WS_IPV6_ADD_MEMBERSHIP: +#endif +#ifdef IPV6_DROP_MEMBERSHIP + case WS_IPV6_DROP_MEMBERSHIP: +#endif + case WS_IPV6_MULTICAST_IF: + case WS_IPV6_MULTICAST_HOPS: + case WS_IPV6_MULTICAST_LOOP: + case WS_IPV6_UNICAST_HOPS: + case WS_IPV6_V6ONLY: + if ( (fd = get_sock_fd( s, 0, NULL )) == -1) + return SOCKET_ERROR; + convert_sockopt(&level, &optname); + if (getsockopt(fd, level, optname, optval, (unsigned int *)optlen) != 0 ) + { + SetLastError((errno == EBADF) ? WSAENOTSOCK : wsaErrno()); + ret = SOCKET_ERROR; + } + release_sock_fd( s, fd ); + return ret; + case WS_IPV6_DONTFRAG: + FIXME("WS_IPV6_DONTFRAG is always false!\n"); + *(BOOL*)optval = FALSE; + return 0; + } + FIXME("Unknown IPPROTO_IPV6 optname 0x%08x\n", optname); return SOCKET_ERROR; default:
1
0
0
0
← Newer
1
...
82
83
84
85
86
87
88
89
90
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
89
90
Results per page:
10
25
50
100
200