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
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2021
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1163 discussions
Start a n
N
ew thread
Paul Gofman : mprapi: Add stub for MprConfigServerConnect().
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 2cb4bdb10abcfd751d4d1b2ca7780c778166608a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2cb4bdb10abcfd751d4d1b2c…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Thu Mar 4 15:35:42 2021 +0300 mprapi: Add stub for MprConfigServerConnect(). Fixes ARK Park start failure. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mprapi/mprapi.c | 12 ++++++++++++ dlls/mprapi/mprapi.spec | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/mprapi/mprapi.c b/dlls/mprapi/mprapi.c index cfb4259b339..b3d641fe108 100644 --- a/dlls/mprapi/mprapi.c +++ b/dlls/mprapi/mprapi.c @@ -60,3 +60,15 @@ BOOL APIENTRY MprAdminIsServiceRunning(LPWSTR server) return FALSE; } + +/*********************************************************************** + * MprConfigServerConnect (MPRAPI.@) + */ +DWORD APIENTRY MprConfigServerConnect(LPWSTR server_name, HANDLE *hmprconfig) +{ + FIXME("server_name %s, hmprconfig %p stub.\n", debugstr_w(server_name), hmprconfig); + + *hmprconfig = NULL; + + return ERROR_NOT_SUPPORTED; +} diff --git a/dlls/mprapi/mprapi.spec b/dlls/mprapi/mprapi.spec index 4b5937b8806..21d39841db5 100644 --- a/dlls/mprapi/mprapi.spec +++ b/dlls/mprapi/mprapi.spec @@ -82,7 +82,7 @@ @ stub MprConfigInterfaceTransportRemove @ stub MprConfigInterfaceTransportSetInfo @ stub MprConfigServerBackup -@ stub MprConfigServerConnect +@ stdcall MprConfigServerConnect(wstr ptr) @ stub MprConfigServerDisconnect @ stub MprConfigServerGetInfo @ stub MprConfigServerInstall
1
0
0
0
Hugh McMaster : reg/tests: Pass __FILE__ from the caller so the correct filename is shown in error logs.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: e3a738b1562de68bd92c4be6bc948ea31f6a2d79 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e3a738b1562de68bd92c4be6…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Thu Mar 4 21:42:49 2021 +1100 reg/tests: Pass __FILE__ from the caller so the correct filename is shown in error logs. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/tests/add.c | 26 ++++++++++---------- programs/reg/tests/export.c | 5 ++-- programs/reg/tests/import.c | 2 +- programs/reg/tests/reg_test.h | 56 ++++++++++++++++++++++--------------------- 4 files changed, 47 insertions(+), 42 deletions(-) diff --git a/programs/reg/tests/add.c b/programs/reg/tests/add.c index bd0888ae831..a34bcf7c9ac 100644 --- a/programs/reg/tests/add.c +++ b/programs/reg/tests/add.c @@ -22,7 +22,7 @@ #define TODO_REG_SIZE (0x0002u) #define TODO_REG_DATA (0x0004u) -BOOL run_reg_exe_(unsigned line, const char *cmd, DWORD *rc) +BOOL run_reg_exe_(const char *file, unsigned line, const char *cmd, DWORD *rc) { STARTUPINFOA si = {sizeof(STARTUPINFOA)}; PROCESS_INFORMATION pi; @@ -51,8 +51,8 @@ BOOL run_reg_exe_(unsigned line, const char *cmd, DWORD *rc) return bret; } -void verify_reg_(unsigned line, HKEY hkey, const char* value, DWORD exp_type, - const void *exp_data, DWORD exp_size, DWORD todo) +void verify_reg_(const char *file, unsigned line, HKEY hkey, const char *value, + DWORD exp_type, const void *exp_data, DWORD exp_size, DWORD todo) { DWORD type, size; BYTE data[256]; @@ -76,7 +76,7 @@ void verify_reg_(unsigned line, HKEY hkey, const char* value, DWORD exp_type, } } -void verify_reg_nonexist_(unsigned line, HKEY hkey, const char *value) +void verify_reg_nonexist_(const char *file, unsigned line, HKEY hkey, const char *value) { LONG err; @@ -85,7 +85,8 @@ void verify_reg_nonexist_(unsigned line, HKEY hkey, const char *value) (value && *value) ? value : "(Default)", err); } -void open_key_(unsigned line, const HKEY base, const char *path, const DWORD sam, HKEY *hkey) +void open_key_(const char *file, unsigned line, const HKEY base, const char *path, + const DWORD sam, HKEY *hkey) { LONG err; @@ -93,7 +94,7 @@ void open_key_(unsigned line, const HKEY base, const char *path, const DWORD sam lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: %d\n", err); } -void close_key_(unsigned line, HKEY hkey) +void close_key_(const char *file, unsigned line, HKEY hkey) { LONG err; @@ -101,7 +102,7 @@ void close_key_(unsigned line, HKEY hkey) lok(err == ERROR_SUCCESS, "RegCloseKey failed: %d\n", err); } -void verify_key_(unsigned line, HKEY key_base, const char *subkey) +void verify_key_(const char *file, unsigned line, HKEY key_base, const char *subkey) { HKEY hkey; LONG err; @@ -113,7 +114,7 @@ void verify_key_(unsigned line, HKEY key_base, const char *subkey) RegCloseKey(hkey); } -void verify_key_nonexist_(unsigned line, HKEY key_base, const char *subkey) +void verify_key_nonexist_(const char *file, unsigned line, HKEY key_base, const char *subkey) { HKEY hkey; LONG err; @@ -126,7 +127,7 @@ void verify_key_nonexist_(unsigned line, HKEY key_base, const char *subkey) RegCloseKey(hkey); } -void add_key_(unsigned line, const HKEY hkey, const char *path, HKEY *subkey) +void add_key_(const char *file, unsigned line, const HKEY hkey, const char *path, HKEY *subkey) { LONG err; @@ -135,7 +136,7 @@ void add_key_(unsigned line, const HKEY hkey, const char *path, HKEY *subkey) lok(err == ERROR_SUCCESS, "RegCreateKeyExA failed: %d\n", err); } -void delete_key_(unsigned line, const HKEY hkey, const char *path) +void delete_key_(const char *file, unsigned line, const HKEY hkey, const char *path) { if (path && *path) { @@ -188,7 +189,8 @@ cleanup: return ret; } -void add_value_(unsigned line, HKEY hkey, const char *name, DWORD type, const void *data, size_t size) +void add_value_(const char *file, unsigned line, HKEY hkey, const char *name, + DWORD type, const void *data, size_t size) { LONG err; @@ -196,7 +198,7 @@ void add_value_(unsigned line, HKEY hkey, const char *name, DWORD type, const vo lok(err == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", err); } -void delete_value_(unsigned line, const HKEY hkey, const char *name) +void delete_value_(const char *file, unsigned line, const HKEY hkey, const char *name) { LONG err; diff --git a/programs/reg/tests/export.c b/programs/reg/tests/export.c index 9a3f7d5fbf0..32c99e36376 100644 --- a/programs/reg/tests/export.c +++ b/programs/reg/tests/export.c @@ -20,8 +20,9 @@ #define TODO_REG_COMPARE (0x0008u) -#define compare_export(f,e,todo) compare_export_(__LINE__,f,e,todo) -static BOOL compare_export_(unsigned line, const char *filename, const char *expected, DWORD todo) +#define compare_export(f,e,todo) compare_export_(__FILE__,__LINE__,f,e,todo) +static BOOL compare_export_(const char *file, unsigned line, const char *filename, + const char *expected, DWORD todo) { FILE *fp; long file_size; diff --git a/programs/reg/tests/import.c b/programs/reg/tests/import.c index 58831625fa5..9b7a90ac99c 100644 --- a/programs/reg/tests/import.c +++ b/programs/reg/tests/import.c @@ -37,7 +37,7 @@ static BOOL write_file(const void *str, DWORD size) return ret; } -BOOL import_reg(unsigned line, const char *contents, BOOL unicode, DWORD *rc) +BOOL import_reg(const char *file, unsigned line, const char *contents, BOOL unicode, DWORD *rc) { int lenA; BOOL ret; diff --git a/programs/reg/tests/reg_test.h b/programs/reg/tests/reg_test.h index 2f4bdf36437..14afa02930c 100644 --- a/programs/reg/tests/reg_test.h +++ b/programs/reg/tests/reg_test.h @@ -24,52 +24,54 @@ #include "wine/test.h" /* Common #defines */ -#define lok ok_(__FILE__,line) +#define lok ok_(file,line) #define KEY_WINE "Software\\Wine" #define KEY_BASE KEY_WINE "\\reg_test" #define REG_EXIT_SUCCESS 0 #define REG_EXIT_FAILURE 1 /* add.c */ -#define run_reg_exe(c,r) run_reg_exe_(__LINE__,c,r) -BOOL run_reg_exe_(unsigned line, const char *cmd, DWORD *rc); +#define run_reg_exe(c,r) run_reg_exe_(__FILE__,__LINE__,c,r) +BOOL run_reg_exe_(const char *file, unsigned line, const char *cmd, DWORD *rc); -#define verify_reg(k,v,t,d,s,todo) verify_reg_(__LINE__,k,v,t,d,s,todo) -void verify_reg_(unsigned line, HKEY hkey, const char* value, DWORD exp_type, - const void *exp_data, DWORD exp_size, DWORD todo); +#define verify_reg(k,v,t,d,s,todo) verify_reg_(__FILE__,__LINE__,k,v,t,d,s,todo) +void verify_reg_(const char *file, unsigned line, HKEY hkey, const char *value, + DWORD exp_type, const void *exp_data, DWORD exp_size, DWORD todo); -#define verify_reg_nonexist(k,v) verify_reg_nonexist_(__LINE__,k,v) -void verify_reg_nonexist_(unsigned line, HKEY hkey, const char *value); +#define verify_reg_nonexist(k,v) verify_reg_nonexist_(__FILE__,__LINE__,k,v) +void verify_reg_nonexist_(const char *file, unsigned line, HKEY hkey, const char *value); -#define open_key(b,p,s,k) open_key_(__LINE__,b,p,s,k) -void open_key_(unsigned line, const HKEY base, const char *path, const DWORD sam, HKEY *hkey); +#define open_key(b,p,s,k) open_key_(__FILE__,__LINE__,b,p,s,k) +void open_key_(const char *file, unsigned line, const HKEY base, const char *path, + const DWORD sam, HKEY *hkey); -#define close_key(k) close_key_(__LINE__,k) -void close_key_(unsigned line, HKEY hkey); +#define close_key(k) close_key_(__FILE__,__LINE__,k) +void close_key_(const char *file, unsigned line, HKEY hkey); -#define verify_key(k,s) verify_key_(__LINE__,k,s) -void verify_key_(unsigned line, HKEY key_base, const char *subkey); +#define verify_key(k,s) verify_key_(__FILE__,__LINE__,k,s) +void verify_key_(const char *file, unsigned line, HKEY key_base, const char *subkey); -#define verify_key_nonexist(k,s) verify_key_nonexist_(__LINE__,k,s) -void verify_key_nonexist_(unsigned line, HKEY key_base, const char *subkey); +#define verify_key_nonexist(k,s) verify_key_nonexist_(__FILE__,__LINE__,k,s) +void verify_key_nonexist_(const char *file, unsigned line, HKEY key_base, const char *subkey); -#define add_key(k,p,s) add_key_(__LINE__,k,p,s) -void add_key_(unsigned line, const HKEY hkey, const char *path, HKEY *subkey); +#define add_key(k,p,s) add_key_(__FILE__,__LINE__,k,p,s) +void add_key_(const char *file, unsigned line, const HKEY hkey, const char *path, HKEY *subkey); -#define delete_key(k,p) delete_key_(__LINE__,k,p) -void delete_key_(unsigned line, const HKEY hkey, const char *path); +#define delete_key(k,p) delete_key_(__FILE__,__LINE__,k,p) +void delete_key_(const char *file, unsigned line, const HKEY hkey, const char *path); LONG delete_tree(const HKEY key, const char *subkey); -#define add_value(k,n,t,d,s) add_value_(__LINE__,k,n,t,d,s) -void add_value_(unsigned line, HKEY hkey, const char *name, DWORD type, const void *data, size_t size); +#define add_value(k,n,t,d,s) add_value_(__FILE__,__LINE__,k,n,t,d,s) +void add_value_(const char *file, unsigned line, HKEY hkey, const char *name, + DWORD type, const void *data, size_t size); -#define delete_value(k,n) delete_value_(__LINE__,k,n) -void delete_value_(unsigned line, const HKEY hkey, const char *name); +#define delete_value(k,n) delete_value_(__FILE__,__LINE__,k,n) +void delete_value_(const char *file, unsigned line, const HKEY hkey, const char *name); /* import.c */ -#define test_import_str(c,r) import_reg(__LINE__,c,FALSE,r) -#define test_import_wstr(c,r) import_reg(__LINE__,c,TRUE,r) -BOOL import_reg(unsigned line, const char *contents, BOOL unicode, DWORD *rc); +#define test_import_str(c,r) import_reg(__FILE__,__LINE__,c,FALSE,r) +#define test_import_wstr(c,r) import_reg(__FILE__,__LINE__,c,TRUE,r) +BOOL import_reg(const char *file, unsigned line, const char *contents, BOOL unicode, DWORD *rc); #endif /* __REG_TEST_H__ */
1
0
0
0
Giovanni Mascellani : dwrite/tests: Do not assume that fonts have a en-us name.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 0e4172a0c22a6f293cc3c5e1de265b2a5b480880 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0e4172a0c22a6f293cc3c5e1…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Wed Mar 3 12:38:50 2021 +0100 dwrite/tests: Do not assume that fonts have a en-us name. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/tests/analyzer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c index 6dd251270c7..0294bbfb719 100644 --- a/dlls/dwrite/tests/analyzer.c +++ b/dlls/dwrite/tests/analyzer.c @@ -1500,7 +1500,10 @@ static void get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, unsig hr = IDWriteLocalizedStrings_FindLocaleName(strings, L"en-us", &index, &exists); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(exists, "Failed to find locale name %d.\n", exists); + + /* Not all fonts have an en-us name! */ + if (!exists) + index = 0; hr = IDWriteLocalizedStrings_GetString(strings, index, buff, size); ok(hr == S_OK, "Failed to get name string, hr %#x.\n", hr);
1
0
0
0
Alexandre Julliard : ntdll: Launch wineboot from the Unix side.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 0599347e96afb0152873ef2baf240e32bf8fe78b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0599347e96afb0152873ef2b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 4 13:27:42 2021 +0100 ntdll: Launch wineboot from the Unix side. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/env.c | 181 -------------------------------------------------- dlls/ntdll/unix/env.c | 91 +++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 181 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=0599347e96afb0152873…
1
0
0
0
Alexandre Julliard : ntdll: Make sure we send valid object attributes in NtCreateUserProcess().
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: d0a1bddea0f618c199e2b7d9930ab06df6c61935 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d0a1bddea0f618c199e2b7d9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 4 13:04:42 2021 +0100 ntdll: Make sure we send valid object attributes in NtCreateUserProcess(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c index 083a3a82a1d..ca9951dfa03 100644 --- a/dlls/ntdll/unix/process.c +++ b/dlls/ntdll/unix/process.c @@ -861,6 +861,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_ CLIENT_ID id; HANDLE parent = 0, debug = 0, token = 0; UNICODE_STRING path = {0}; + OBJECT_ATTRIBUTES empty_attr = { sizeof(empty_attr) }; SIZE_T i, attr_count = (attr->TotalLength - sizeof(attr->TotalLength)) / sizeof(PS_ATTRIBUTE); const PS_ATTRIBUTE *handles_attr = NULL; data_size_t handles_size; @@ -893,6 +894,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_ break; } } + if (!process_attr) process_attr = &empty_attr; TRACE( "%s image %s cmdline %s parent %p\n", debugstr_us( &path ), debugstr_us( ¶ms->ImagePathName ), debugstr_us( ¶ms->CommandLine ), parent );
1
0
0
0
Alexandre Julliard : ntdll: Predefine the SystemRoot and SystemDrive variables.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 9443a7397df534383aeb37abdb62be266a33339b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9443a7397df534383aeb37ab…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 4 10:56:54 2021 +0100 ntdll: Predefine the SystemRoot and SystemDrive variables. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/env.c | 2 ++ loader/wine.inf.in | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 97a43a90000..7836cd1144d 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -1239,6 +1239,8 @@ static void add_dynamic_environment( WCHAR **env, SIZE_T *pos, SIZE_T *size ) append_envA( env, pos, size, "WINELOCALE", system_locale ); append_envA( env, pos, size, "WINEUSERLOCALE", strcmp( user_locale, system_locale ) ? user_locale : NULL ); + append_envA( env, pos, size, "SystemDrive", "C:" ); + append_envA( env, pos, size, "SystemRoot", "C:\\windows" ); } diff --git a/loader/wine.inf.in b/loader/wine.inf.in index d5dd2d5b66b..627d98a9e66 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -639,14 +639,12 @@ HKLM,%Control%\Session Manager,HeapDeCommitFreeBlockThreshold,0x00040002,0 HKLM,%Control%\Session Manager,HeapDeCommitTotalFreeThreshold,0x00040002,0 HKLM,%Control%\Session Manager,HeapSegmentCommit,0x00040002,0 HKLM,%Control%\Session Manager,HeapSegmentReserve,0x00040002,0 -HKLM,%Control%\Session Manager\Environment,"ComSpec",0x00020000,"%11%\cmd.exe" -HKLM,%Control%\Session Manager\Environment,"PATH",0x00020002,"%11%;%10%;%11%\wbem;%11%\WindowsPowershell\v1.0" +HKLM,%Control%\Session Manager\Environment,"ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe" +HKLM,%Control%\Session Manager\Environment,"PATH",0x00020002,"%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem;%SystemRoot%\system32\WindowsPowershell\v1.0" HKLM,%Control%\Session Manager\Environment,"PATHEXT",,".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH" -HKLM,%Control%\Session Manager\Environment,"SystemDrive",2,"c:" -HKLM,%Control%\Session Manager\Environment,"SYSTEMROOT",,"%10%" -HKLM,%Control%\Session Manager\Environment,"TEMP",0x00020002,"%10%\temp" -HKLM,%Control%\Session Manager\Environment,"TMP",0x00020002,"%10%\temp" -HKLM,%Control%\Session Manager\Environment,"windir",0x00020000,"%10%" +HKLM,%Control%\Session Manager\Environment,"TEMP",0x00020002,"%SystemRoot%\temp" +HKLM,%Control%\Session Manager\Environment,"TMP",0x00020002,"%SystemRoot%\temp" +HKLM,%Control%\Session Manager\Environment,"windir",0x00020000,"%SystemRoot%" HKLM,%Control%\Session Manager\Environment,"winsysdir",,"%11%" HKLM,%Control%\Session Manager\Memory Management,PagingFiles,,"%24%\pagefile.sys 27 77" HKLM,%Control%\Session Manager\Memory Management,WriteWatch,0x00040002,1
1
0
0
0
Alexandre Julliard : ntdll: Set environment variables from the registry on the Unix side.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: f6e64c55f2ddcb92a9ff53f18d1b12f366dd4036 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f6e64c55f2ddcb92a9ff53f1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 3 11:25:43 2021 +0100 ntdll: Set environment variables from the registry on the Unix side. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/env.c | 2 +- dlls/ntdll/unix/env.c | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c index 4931e407e57..ade6aefc2d5 100644 --- a/dlls/ntdll/env.c +++ b/dlls/ntdll/env.c @@ -1023,7 +1023,7 @@ void init_user_process_params(void) if (!params->DllPath.MaximumLength) /* not inherited from parent process */ { - first_prefix_start = set_registry_environment( ¶ms->Environment, TRUE ); + first_prefix_start = !ENV_FindVariable( params->Environment, L"COMSPEC", 7 ); set_additional_environment( ¶ms->Environment ); get_image_path( params->ImagePathName.Buffer, image, sizeof(image) ); diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 92498318665..97a43a90000 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -1242,6 +1242,148 @@ static void add_dynamic_environment( WCHAR **env, SIZE_T *pos, SIZE_T *size ) } +static WCHAR *expand_value( WCHAR *env, SIZE_T size, const WCHAR *src, SIZE_T src_len ) +{ + SIZE_T len, retlen = src_len, count = 0; + const WCHAR *var; + WCHAR *ret; + + ret = malloc( retlen * sizeof(WCHAR) ); + while (src_len) + { + if (*src != '%') + { + for (len = 0; len < src_len; len++) if (src[len] == '%') break; + var = src; + src += len; + src_len -= len; + } + else /* we are at the start of a variable */ + { + for (len = 1; len < src_len; len++) if (src[len] == '%') break; + if (len < src_len) + { + if ((var = find_env_var( env, size, src + 1, len - 1 ))) + { + src += len + 1; /* skip the variable name */ + src_len -= len + 1; + var += len; + len = wcslen(var); + } + else + { + var = src; /* copy original name instead */ + len++; + src += len; + src_len -= len; + } + } + else /* unfinished variable name, ignore it */ + { + var = src; + src += len; + src_len = 0; + } + } + if (len >= retlen - count) + { + retlen *= 2; + ret = realloc( ret, retlen * sizeof(WCHAR) ); + } + memcpy( ret + count, var, len * sizeof(WCHAR) ); + count += len; + } + ret[count] = 0; + return ret; +} + +/*********************************************************************** + * add_registry_variables + * + * Set environment variables by enumerating the values of a key; + * helper for add_registry_environment(). + * Note that Windows happily truncates the value if it's too big. + */ +static void add_registry_variables( WCHAR **env, SIZE_T *pos, SIZE_T *size, HANDLE key, BOOL append ) +{ + static const WCHAR pathW[] = {'P','A','T','H'}; + NTSTATUS status; + DWORD index = 0, info_size, namelen, datalen; + WCHAR *data, *value, *p; + WCHAR buffer[offsetof(KEY_VALUE_FULL_INFORMATION, Name[1024]) / sizeof(WCHAR)]; + KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer; + + for (;;) + { + status = NtEnumerateValueKey( key, index++, KeyValueFullInformation, + buffer, sizeof(buffer) - sizeof(WCHAR), &info_size ); + if (status != STATUS_SUCCESS && status != STATUS_BUFFER_OVERFLOW) break; + + value = data = buffer + info->DataOffset / sizeof(WCHAR); + datalen = info->DataLength / sizeof(WCHAR); + namelen = info->NameLength / sizeof(WCHAR); + + if (datalen && !data[datalen - 1]) datalen--; /* don't count terminating null if any */ + if (!datalen) continue; + data[datalen] = 0; + if (info->Type == REG_EXPAND_SZ) value = expand_value( *env, *pos, data, datalen ); + + /* PATH is magic */ + if (append && namelen == 4 && !wcsnicmp( info->Name, pathW, 4 ) && (p = find_env_var( *env, *pos, pathW, 4 ))) + { + static const WCHAR sepW[] = {';',0}; + WCHAR *newpath = malloc( (wcslen(p) - 4 + datalen) * sizeof(WCHAR) ); + wcscpy( newpath, p + 5 ); + wcscat( newpath, sepW ); + wcscat( newpath, data ); + if (value != data) free( value ); + value = newpath; + } + + set_env_var( env, pos, size, info->Name, namelen, value ); + if (value != data) free( value ); + } +} + + +/*********************************************************************** + * add_registry_environment + * + * Set the environment variables specified in the registry. + */ +static void add_registry_environment( WCHAR **env, SIZE_T *pos, SIZE_T *size ) +{ + static const WCHAR syskeyW[] = {'\\','R','e','g','i','s','t','r','y', + '\\','M','a','c','h','i','n','e', + '\\','S','y','s','t','e','m', + '\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t', + '\\','C','o','n','t','r','o','l', + '\\','S','e','s','s','i','o','n',' ','M','a','n','a','g','e','r', + '\\','E','n','v','i','r','o','n','m','e','n','t',0}; + OBJECT_ATTRIBUTES attr; + UNICODE_STRING nameW; + HANDLE key; + + InitializeObjectAttributes( &attr, &nameW, 0, 0, NULL ); + init_unicode_string( &nameW, syskeyW ); + if (!NtOpenKey( &key, KEY_READ, &attr )) + { + add_registry_variables( env, pos, size, key, FALSE ); + NtClose( key ); + } + if (!open_hkcu_key( "Environment", &key )) + { + add_registry_variables( env, pos, size, key, TRUE ); + NtClose( key ); + } + if (!open_hkcu_key( "Volatile Environment", &key )) + { + add_registry_variables( env, pos, size, key, TRUE ); + NtClose( key ); + } +} + + /************************************************************************* * get_initial_console * @@ -1485,6 +1627,7 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void) NTSTATUS status; add_dynamic_environment( &env, &env_pos, &env_size ); + add_registry_environment( &env, &env_pos, &env_size ); env[env_pos++] = 0; size = (sizeof(*params)
1
0
0
0
Alexandre Julliard : ntdll: Add support for growing the initial environment dynamically.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: e63b8ead4306a72064e47f9c77d4e0a98603f3ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e63b8ead4306a72064e47f9c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 3 09:56:30 2021 +0100 ntdll: Add support for growing the initial environment dynamically. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/env.c | 206 ++++++++++++++++++++++++-------------------------- 1 file changed, 100 insertions(+), 106 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e63b8ead4306a72064e4…
1
0
0
0
Alexandre Julliard : ntdll: Make the open_hkcu_key() helper available globally.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 16b099441264e155edc58885868cd0ebb1e193b7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=16b099441264e155edc58885…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 3 10:00:29 2021 +0100 ntdll: Make the open_hkcu_key() helper available globally. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/file.c | 29 ----------------------------- dlls/ntdll/unix/registry.c | 29 +++++++++++++++++++++++++++++ dlls/ntdll/unix/unix_private.h | 3 +-- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 315354be7aa..bcaf03a2d02 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -2727,35 +2727,6 @@ static int get_redirect_path( char *unix_name, int pos, const WCHAR *name, int l #define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1') -static NTSTATUS open_hkcu_key( const char *path, HANDLE *key ) -{ - NTSTATUS status; - char buffer[256]; - WCHAR bufferW[256]; - DWORD_PTR sid_data[(sizeof(TOKEN_USER) + SECURITY_MAX_SID_SIZE) / sizeof(DWORD_PTR)]; - DWORD i, len = sizeof(sid_data); - SID *sid; - UNICODE_STRING name; - OBJECT_ATTRIBUTES attr; - - status = NtQueryInformationToken( GetCurrentThreadEffectiveToken(), TokenUser, sid_data, len, &len ); - if (status) return status; - - sid = ((TOKEN_USER *)sid_data)->User.Sid; - len = sprintf( buffer, "\\Registry\\User\\S-%u-%u", sid->Revision, - MAKELONG( MAKEWORD( sid->IdentifierAuthority.Value[5], sid->IdentifierAuthority.Value[4] ), - MAKEWORD( sid->IdentifierAuthority.Value[3], sid->IdentifierAuthority.Value[2] ))); - for (i = 0; i < sid->SubAuthorityCount; i++) - len += sprintf( buffer + len, "-%u", sid->SubAuthority[i] ); - len += sprintf( buffer + len, "\\%s", path ); - - ascii_to_unicode( bufferW, buffer, len + 1 ); - init_unicode_string( &name, bufferW ); - InitializeObjectAttributes( &attr, &name, OBJ_CASE_INSENSITIVE, 0, NULL ); - return NtCreateKey( key, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ); -} - - /*********************************************************************** * init_files */ diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c index b52811b05e7..9a572d7f44e 100644 --- a/dlls/ntdll/unix/registry.c +++ b/dlls/ntdll/unix/registry.c @@ -40,6 +40,35 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg); #define MAX_VALUE_LENGTH (16383 * sizeof(WCHAR)) +NTSTATUS open_hkcu_key( const char *path, HANDLE *key ) +{ + NTSTATUS status; + char buffer[256]; + WCHAR bufferW[256]; + DWORD_PTR sid_data[(sizeof(TOKEN_USER) + SECURITY_MAX_SID_SIZE) / sizeof(DWORD_PTR)]; + DWORD i, len = sizeof(sid_data); + SID *sid; + UNICODE_STRING name; + OBJECT_ATTRIBUTES attr; + + status = NtQueryInformationToken( GetCurrentThreadEffectiveToken(), TokenUser, sid_data, len, &len ); + if (status) return status; + + sid = ((TOKEN_USER *)sid_data)->User.Sid; + len = sprintf( buffer, "\\Registry\\User\\S-%u-%u", sid->Revision, + MAKELONG( MAKEWORD( sid->IdentifierAuthority.Value[5], sid->IdentifierAuthority.Value[4] ), + MAKEWORD( sid->IdentifierAuthority.Value[3], sid->IdentifierAuthority.Value[2] ))); + for (i = 0; i < sid->SubAuthorityCount; i++) + len += sprintf( buffer + len, "-%u", sid->SubAuthority[i] ); + len += sprintf( buffer + len, "\\%s", path ); + + ascii_to_unicode( bufferW, buffer, len + 1 ); + init_unicode_string( &name, bufferW ); + InitializeObjectAttributes( &attr, &name, OBJ_CASE_INSENSITIVE, 0, NULL ); + return NtCreateKey( key, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ); +} + + /****************************************************************************** * NtCreateKey (NTDLL.@) */ diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index c8156fbcb6b..b8b6619c0a9 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -105,8 +105,6 @@ extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN; extern NTSTATUS CDECL unwind_builtin_dll( ULONG type, struct _DISPATCHER_CONTEXT *dispatch, CONTEXT *context ) DECLSPEC_HIDDEN; -extern void CDECL set_show_dot_files( BOOL enable ) DECLSPEC_HIDDEN; - extern const char *home_dir DECLSPEC_HIDDEN; extern const char *data_dir DECLSPEC_HIDDEN; extern const char *build_dir DECLSPEC_HIDDEN; @@ -215,6 +213,7 @@ extern void DECLSPEC_NORETURN exec_process( NTSTATUS status ) DECLSPEC_HIDDEN; extern void __wine_syscall_dispatcher(void) DECLSPEC_HIDDEN; extern void signal_restore_full_cpu_context(void) DECLSPEC_HIDDEN; extern void fill_vm_counters( VM_COUNTERS_EX *pvmi, int unix_pid ) DECLSPEC_HIDDEN; +extern NTSTATUS open_hkcu_key( const char *path, HANDLE *key ) DECLSPEC_HIDDEN; extern NTSTATUS cdrom_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user, IO_STATUS_BLOCK *io, ULONG code, void *in_buffer,
1
0
0
0
Alexandre Julliard : ntdll: Add a helper to initialize a UNICODE_STRING on the Unix side.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 285830f5ec2a4cc22ed9f3bbd1e62136deb0652d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=285830f5ec2a4cc22ed9f3bb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 3 09:50:34 2021 +0100 ntdll: Add a helper to initialize a UNICODE_STRING on the Unix side. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/env.c | 8 ++------ dlls/ntdll/unix/file.c | 11 +++-------- dlls/ntdll/unix/loader.c | 4 +--- dlls/ntdll/unix/system.c | 4 +--- dlls/ntdll/unix/unix_private.h | 7 +++++++ 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index cca334865e4..d1a669a4964 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -168,9 +168,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file ) wcscpy( buffer, type == NLS_SECTION_SORTKEYS ? sortdirW : systemdirW ); p = strrchr( path, '/' ) + 1; ascii_to_unicode( buffer + wcslen(buffer), p, strlen(p) + 1 ); - valueW.Buffer = buffer; - valueW.Length = wcslen( buffer ) * sizeof(WCHAR); - valueW.MaximumLength = sizeof( buffer ); + init_unicode_string( &valueW, buffer ); InitializeObjectAttributes( &attr, &valueW, 0, 0, NULL ); status = open_unix_file( file, path, GENERIC_READ, &attr, 0, FILE_SHARE_READ, @@ -1645,9 +1643,7 @@ NTSTATUS WINAPI NtGetNlsSectionPtr( ULONG type, ULONG id, void *unknown, void ** if ((status = get_nls_section_name( type, id, name ))) return status; - nameW.Buffer = name; - nameW.Length = wcslen(name) * sizeof(WCHAR); - nameW.MaximumLength = sizeof(name); + init_unicode_string( &nameW, name ); InitializeObjectAttributes( &attr, &nameW, 0, 0, NULL ); if ((status = NtOpenSection( &handle, SECTION_MAP_READ, &attr ))) { diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 381805c0f04..315354be7aa 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -1974,8 +1974,7 @@ static NTSTATUS get_mountmgr_fs_info( HANDLE handle, int fd, struct mountmgr_uni else drive->letter = 'a' + letter; - string.Buffer = (WCHAR *)MOUNTMGR_DEVICE_NAME; - string.Length = sizeof(MOUNTMGR_DEVICE_NAME) - sizeof(WCHAR); + init_unicode_string( &string, MOUNTMGR_DEVICE_NAME ); InitializeObjectAttributes( &attr, &string, 0, NULL, NULL ); status = NtOpenFile( &mountmgr, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT ); @@ -2750,10 +2749,8 @@ static NTSTATUS open_hkcu_key( const char *path, HANDLE *key ) len += sprintf( buffer + len, "-%u", sid->SubAuthority[i] ); len += sprintf( buffer + len, "\\%s", path ); - name.Buffer = bufferW; - name.Length = len * sizeof(WCHAR); - name.MaximumLength = name.Length + sizeof(WCHAR); ascii_to_unicode( bufferW, buffer, len + 1 ); + init_unicode_string( &name, bufferW ); InitializeObjectAttributes( &attr, &name, OBJ_CASE_INSENSITIVE, 0, NULL ); return NtCreateKey( key, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ); } @@ -2787,9 +2784,7 @@ void init_files(void) DWORD dummy; UNICODE_STRING nameW; - nameW.MaximumLength = sizeof(showdotfilesW); - nameW.Length = nameW.MaximumLength - sizeof(WCHAR); - nameW.Buffer = showdotfilesW; + init_unicode_string( &nameW, showdotfilesW ); if (!NtQueryValueKey( key, &nameW, KeyValuePartialInformation, tmp, sizeof(tmp), &dummy )) { WCHAR *str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)tmp)->Data; diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index b7e1432535d..6adf4bb5b00 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -1618,9 +1618,7 @@ static void load_ntdll(void) void *module; char *name = build_path( dll_dir, "ntdll.dll.so" ); - str.Buffer = path; - str.Length = sizeof(path) - sizeof(WCHAR); - str.MaximumLength = sizeof(path); + init_unicode_string( &str, path ); InitializeObjectAttributes( &attr, &str, 0, 0, NULL ); name[strlen(name) - 3] = 0; /* remove .so */ status = open_builtin_file( name, &attr, &mapping, &module, &info, &st, FALSE ); diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 788328292de..48321957fb8 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -1809,9 +1809,7 @@ static void find_reg_tz_info(RTL_DYNAMIC_TIME_ZONE_INFORMATION *tzi, const char* sprintf( buffer, "%u", year ); ascii_to_unicode( yearW, buffer, strlen(buffer) + 1 ); - - nameW.Buffer = (WCHAR *)Time_ZonesW; - nameW.Length = sizeof(Time_ZonesW) - sizeof(WCHAR); + init_unicode_string( &nameW, Time_ZonesW ); InitializeObjectAttributes( &attr, &nameW, 0, 0, NULL ); if (NtOpenKey( &key, KEY_READ, &attr )) return; diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 031f9ed3d33..c8156fbcb6b 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -482,4 +482,11 @@ static inline int ntdll_wcsnicmp( const WCHAR *str1, const WCHAR *str2, int n ) #define towupper(c) ntdll_towupper(c) #define towlower(c) ntdll_towlower(c) +static inline void init_unicode_string( UNICODE_STRING *str, const WCHAR *data ) +{ + str->Length = wcslen(data) * sizeof(WCHAR); + str->MaximumLength = str->Length + sizeof(WCHAR); + str->Buffer = (WCHAR *)data; +} + #endif /* __NTDLL_UNIX_PRIVATE_H */
1
0
0
0
← Newer
1
...
96
97
98
99
100
101
102
...
117
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200